Created
December 9, 2013 22:12
-
-
Save elken/7881949 to your computer and use it in GitHub Desktop.
py2.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- pytacle-alpha2/pytacle.py 2013-10-30 17:18:38.000000000 +0000 | |
+++ /usr/bin/pytacle 2013-12-09 21:37:04.998738701 +0000 | |
@@ -1,4 +1,4 @@ | |
-#!/usr/bin/env python | |
+#!/usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
# | |
# pytacle.py | |
@@ -41,6 +41,8 @@ | |
import gtk | |
gtk.gdk.threads_init() | |
+import sys | |
+sys.path.append("/usr/lib/python2.7/pytacle") | |
from mcc_mnc import codes | |
VERSION = "v0.2" | |
@@ -530,7 +532,7 @@ | |
stream = self.xor(clburst, ciburst) | |
try: | |
key = self.send_to_kraken(stream) | |
- except Exception, e: | |
+ except Exception as e: | |
self.log_t("Error sending to kraken: %s\n" % str(e), "error") | |
if key != None: | |
self.log_t("Found key '%s' for fn %s\n" % (key, cifn), "info") | |
@@ -753,12 +755,12 @@ | |
signal.signal(signal.SIGINT, app.destroy_event) | |
try: | |
app.main() | |
- except Exception, e: | |
- print e | |
+ except Exception as e: | |
+ print(e) | |
if DEBUG: | |
- print '-'*60 | |
+ print('-'*60) | |
traceback.print_exc(file=sys.stdout) | |
- print '-'*60 | |
+ print('-'*60) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment