From f0af533e4df5aa2d2387613bd387743dc884be06 Mon Sep 17 00:00:00 2001 From: kibergus Date: Tue, 2 Nov 2010 06:46:13 +0000 Subject: [PATCH] final fixes for PR1.3 git-svn-id: file:///svnroot/ussd-widget/trunk@42 d197f4d6-dc93-42ad-8354-0da1f58e353f --- ussd4all/rtcom/rtcompatcher.py | 8 +++++--- ussd4all/ussdquery/ussdquery.py | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ussd4all/rtcom/rtcompatcher.py b/ussd4all/rtcom/rtcompatcher.py index 7d7cceb..0034fbf 100644 --- a/ussd4all/rtcom/rtcompatcher.py +++ b/ussd4all/rtcom/rtcompatcher.py @@ -12,6 +12,8 @@ patch_config = { 'known_md5sums': [ '5a51e4fbb38dac338e4444e6b713e9b3', '44d6b8258fb4fb9c849162704120ba53', +# PR 1.3 + '2c2713a25e323670cad57d5f856f0acf' ], 'check_ranges': [ (194380, 'f04f2de920b08de2'), @@ -86,15 +88,15 @@ if __name__ == '__main__': if not patcher.check_md5sum(library): if not patcher.check_data(library): message = "Your %s is not recognized. So I won't patch it." % (library) - subprocess.call(["dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:\""+message+"\" uint32:0 string:\"OK\""],shell=True) + subprocess.call(["dbus-send --system --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:\""+message+"\" uint32:0 string:\"OK\""],shell=True) print message sys.exit(1) if len(sys.argv) > 1 and sys.argv[1] == '--force': message = "Patching an unrecognized %s. Please test your system before rebooting." % (library) print message else: - message = "Your %s is not recognized, but it seems to match the patterns.\nRun '%s --force' to try patching anyway, but understand that\nTHIS MAY BREAK YOUR SYSTEM. If you do, test your system thoroughly before rebooting." % (library,library,sys.argv[0]) - subprocess.call(["dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:\""+message+"\" uint32:0 string:\"OK\""],shell=True) + message = "Your %s is not recognized, but it seems to match the patterns.\nRun '%s --force' to try patching anyway, but understand that\nTHIS MAY BREAK YOUR SYSTEM. If you do, test your system thoroughly before rebooting." % (library,sys.argv[0]) + subprocess.call(["dbus-send --system --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:\""+message+"\" uint32:0 string:\"OK\""],shell=True) print message sys.exit(1) diff --git a/ussd4all/ussdquery/ussdquery.py b/ussd4all/ussdquery/ussdquery.py index 2705dad..fa38dec 100755 --- a/ussd4all/ussdquery/ussdquery.py +++ b/ussd4all/ussdquery/ussdquery.py @@ -65,6 +65,8 @@ def init_modem(modem): if modem == None : # OK response should be recieved shortly modem = pexpect.spawn('pnatd', [], 2) + # FIXME This is a dirty hack. A better solution needed + time.sleep(0.5) try : modem.send('at\r'); # Read our "at" command -- 1.7.9.5