1
0
Fork 0
mirror of synced 2024-12-22 06:01:07 -05:00

Fix source compatibility with Python 3

According to PEP 394, `python` should only be used in the shebang line
for scripts that are source compatible with both Python 2 and Python 3.

In previous versions of Dotbot, on certain systems where `python`
referred to `python3`, running Dotbot would throw an exception due to a
SyntaxError. This can be fixed by making Dotbot source compatible with
both Python 2 and Python 3.
This commit is contained in:
Anish Athalye 2014-06-14 23:56:33 -07:00
parent 0e3e85c366
commit 7200832465

View file

@ -14,7 +14,7 @@ class Messenger(object):
def log(self, level, message):
if (level >= self._level):
print '%s%s%s' % (self._color(level), message, self._reset())
print('%s%s%s' % (self._color(level), message, self._reset()))
def debug(self, message):
self.log(Level.DEBUG, message)