Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use parenthesis around print statements. #21

Open
terrysimons opened this issue Apr 8, 2015 · 0 comments
Open

Use parenthesis around print statements. #21

terrysimons opened this issue Apr 8, 2015 · 0 comments

Comments

@terrysimons
Copy link

Don't use "print 'foo'" type print statements. This breaks forwards compatibility with Python 2.7/Python 3.

diff --git a/firebasin/dataref.py b/firebasin/dataref.py
index f94ccec..4a713b5 100644
--- a/firebasin/dataref.py
+++ b/firebasin/dataref.py
@@ -279,14 +279,14 @@ class RootDataRef(DataRef):
                 if error != 'ok':
                     if error == 'permission_denied':
                         path = request['d']['b']['p']
-                        print 'FIREBASE WARNING: on() or once() for %s failed: %s' % (path, error)
+                        print('FIREBASE WARNING: on() or once() for %s failed: %s' % (path, error))

                     elif error == 'expired_token' or error == 'invalid_token':
-                        print 'FIREBASE WARNING: auth() failed: %s' % (error)
+                        print('FIREBASE WARNING: auth() failed: %s' % (error))

                     else:
                         path = request['d']['b']['p']
-                        print 'FIREBASE WARNING: unknown for %s failed: %s' % (path, error)
+                        print('FIREBASE WARNING: unknown for %s failed: %s' % (path, error))

                     onCancel = callbacks.get('onCancel', None)
                     if not onCancel is None:
diff --git a/firebasin/debug.py b/firebasin/debug.py
index f7f82b7..6add161 100644
--- a/firebasin/debug.py
+++ b/firebasin/debug.py
@@ -3,4 +3,4 @@ def debug(*args):
     '''Print out data if we're in verbose mode'''

     if VERBOSE:
-        print args
+        print(args)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant