Skip to content

Commit 0b971a0

Browse files
committed
Fix MD5 hash regression with python 3
1 parent 45d15a5 commit 0b971a0

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8030,7 +8030,7 @@ Use keyword "geny" to list and start Genymotion emulator</string>
80308030
<string>aapt_path</string>
80318031
</array>
80328032
<key>version</key>
8033-
<string>1.13.1</string>
8033+
<string>1.13.2</string>
80348034
<key>webaddress</key>
80358035
<string>https://github.com/zjn0505/adb-alfred</string>
80368036
</dict>

scripts/list_devices.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ def list_devices(args):
107107
it.setvar('ro.product.manufacturer', item.get('ro.product.manufacturer'))
108108
it.setvar("serial", name)
109109
it.setvar('name', item.get('name'))
110-
if item.subtitle and not re.match(regexIp + ":5555", name):
110+
if item.subtitle and not re.match(regexIp + ":5555", name) and not name.startswith("emulator-"):
111+
# if item.subtitle and not re.match(regexIp + ":5555", name):
111112
cmd_ip = adb_path + ' -s ' + name + " shell ip -f inet addr show wlan0 | grep inet | tr -s ' ' | awk '{print $2}'"
112113
ip = run_script(cmd_ip)
113114
if '/' in ip and re.match(regexIp, ip.split('/')[0]):
@@ -118,7 +119,8 @@ def list_devices(args):
118119

119120
# last func
120121
if name.startswith("emulator-"):
121-
name = hashlib.md5(item.subtitle).hexdigest()
122+
log.debug(item.subtitle)
123+
name = hashlib.md5(item.subtitle.encode("utf-8")).hexdigest()
122124
it.setvar("his_tag", name)
123125
lastFuncs = wf.cached_data('last_func:' + name, max_age=0)
124126
if lastFuncs and len(lastFuncs) > 0:

scripts/save_last_func.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import os
22
import sys
3-
import pickle
4-
import hashlib
53
from workflow import Workflow3
64

75
function = os.getenv("function")

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.13.1
1+
1.13.2

0 commit comments

Comments
 (0)