Skip to content

Use parenthesis around print statements. #21

@terrysimons

Description

@terrysimons

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions