From 3582e669bdd5220ed94f0c2925f48c92c37cc542 Mon Sep 17 00:00:00 2001 From: atticusmatticus <20863400+atticusmatticus@users.noreply.github.com> Date: Wed, 15 Jun 2022 09:29:30 -0500 Subject: [PATCH] Updated for minor changes to string formatting for Mullvad version 2022.2 --- MullvadVPN.alfredworkflow | Bin 1067038 -> 1067043 bytes src/mullvad.py | 15 ++++++++------- src/version | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/MullvadVPN.alfredworkflow b/MullvadVPN.alfredworkflow index d9d5e0544b74fd2c84f2132286753bf8eecd58de..6551eb348f800785d1cc2cc6050823a782abd5c5 100644 GIT binary patch delta 5391 zcmY+IcRUsD`~Qz~j$?&mMMlOsSs^>?a3mv}V}@)p-u4!UW6L<^u`)Y073Ek-WRq+P z*(>5GMMmG!?~l*#kLz(iAJ^-;uj{(+KVOAdagD5NV{iog5NJo(>Ey(s#3rM;9k;@Uq%w$qyO{KNc3+Ev6q#IQplq-b%iQKQ-m`*+Or z06>=}06+;~2mI&n?jB(4AmSBlY(xP7eg0BqxBMskgQx%`;3EpWkQfc`Wvo)cWKT(+|MoCR>fAs{Uvnfs0Z82lre4T1V1JzoxoWhIV9vjOim?}LAX=#4+bDKJs zzRywUpuz9v@6-jaEPXWp3mJ8FJ{`{UOu#nhXLM^wDDhW%W}!*<^%FnUEsi5`wa~?B zH1pG1C0U*WSw%(OXFUun^lBOZL0hx-k^1yVWd%v2cXNEv! zGj$T3lsYlBr?9(us*z+(^Iy87W7rb(nKI$Z2&8SRK(+7=s7SzUc_E?DIAZBFY?U6$ zPEm$7Lp6CxT)ovUlUUgo5^LUGl61yDjVpMYv)sa>B9c4Q;0kMwhutrk!CC6X^zsM^ z9*eDHPUvc|C$CQJ%o;kVwoA_EmObhLv{TT-ONgv2-W%rztyG{`Cmg0}Qz+KMsBcbw zGSo-;+ApL}i?=NPbAoE5LV7@!697FH7aUahU>9zOE4b%H#R^r~;C^9jcQVdn)#i=Q*1JhRrg1*? zQLRG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$s*2z|53G_oH5K3bDVc7JXqxW8So%;vpiDFQwrMKt{~P2Lw-U@XP_#qZ6uDBTC% zt8HMDaZVO|Vpb=+0(n*$?KM8n9Q2;g%9YX&{GI6q%aI_o7WcfIj}rHpIM^STnfb=ui>V65}$cQSjl=4Lh5y~DZE)DUIw&{b4f06 zNXqd=s~i|=`Iaq|^ui~2{baxKwCOo-3O-D`Xq8@>8L?1C5a>#JYcn2x^+>~LYFg=h z5Gnfewb&7ZACaIX)u&|8a5GSz;17PZWo|OS!on*)NIx=n$dWrNM$4IgwQLgax6-3N zjS4$E$Q{4z;JPl5AnNvw#}(WVq(NdM`5FBz$T&*EG6+zIst!sgR4y{t>#?Hx@nYk1 zlTmaEZ-1I}9|UTs|Ah7ikK=Q#!7r|Frh2f@3!-3Y9JYVn9*r3ID-g;q(sCgN=E4HP z{~~q?uoligZ_YyoER3y5i8ho6Goe38gK^OPGT`)o2B5ht7>Z3IeV0j>1LL$*$%0$4 z{%IUwV445b(4wtiU{FgB3`{{l^8ef{^r{+|0~-bVKb5yd!K5T~f6XfZ;IEAZD2bRw cE2@JLSbgXWb+A6xE_z2DEDmy%2LDa|4{2Vp0ssI2 diff --git a/src/mullvad.py b/src/mullvad.py index c2ee9c5..901f34e 100644 --- a/src/mullvad.py +++ b/src/mullvad.py @@ -108,13 +108,13 @@ def connection_status(): Item -- Connected/Disconnected/Blocked """ for status in get_connection(): - # print 'status:', status - stat = str(status.split()[2]) - # print 'stat:', stat + # print('DEBUG:', 'status:', status) + stat = str(status.split()[0]) + # print('DEBUG:', 'stat:', stat) if stat == 'Connected': countryString, cityString = get_country_city() - # print '{} to: {} {}'.format(stat, cityString, countryString).decode('utf8') - # print ' '.join(status.split()[4:])+'. Select to Disconnect.' + # print('DEBUG:', '{} to: {} {}'.format(stat, cityString, countryString))#.decode('utf8')) + # print('DEBUG:', ' '.join(status.split()[4:])+'. Select to Disconnect.') wf.add_item('{} to: {} {}'.format(stat, cityString, countryString), #.decode('utf8'), subtitle=' '.join(status.split()[4:])+'. Select to Disconnect. Type "relay" to change.', arg='/usr/local/bin/mullvad disconnect', @@ -274,8 +274,9 @@ def update_mullvad(): def get_account(): getAcct = execute(['mullvad', 'account', 'get']).splitlines() - # print('DEBUG:', type(getAcct[1].split()[3]), type('%Y-%m-%d')) - deltaDays = (datetime.strptime(getAcct[1].split()[3], '%Y-%m-%d') - datetime.utcnow()).days + # print('DEBUG:', getAcct[2].split()[3]) + # print('DEBUG:', type(getAcct[2].split()[3]), type('%Y-%m-%d')) + deltaDays = (datetime.strptime(getAcct[2].split()[3], '%Y-%m-%d') - datetime.utcnow()).days return [getAcct[0].split()[2], deltaDays] diff --git a/src/version b/src/version index 69da6eb..2d993c4 100644 --- a/src/version +++ b/src/version @@ -1 +1 @@ -0.10.6 +0.10.7