Browse Source

Minimal python3 stuff

Andres J. Diaz 5 years ago
parent
commit
146afdddae
2 changed files with 2 additions and 2 deletions
  1. 1 1
      setup.py
  2. 1 1
      whistler/mixins/poll.py

+ 1 - 1
setup.py

@@ -7,7 +7,7 @@ WHISTLER_VERSION="1.5.3"
 
 
 def get_file_contents(filename):
-    fd = file(path.join(path.dirname(__file__), filename), "r")
+    fd = open(path.join(path.dirname(__file__), filename), "r")
     content = fd.read()
     fd.close()
     return content

+ 1 - 1
whistler/mixins/poll.py

@@ -127,7 +127,7 @@ class PollMixin(object):
             try:
                 poll.vote(msg["from"].bare, choice)
                 return "Your vote has been recorded, thanks"
-            except ValueError, e:
+            except ValueError as e:
                 return str(e)
 
         else: