From 1c6f4c19289732bd13507eba9e54c9d692957137 Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Sun, 13 Jul 2014 15:35:24 -0400 Subject: Automated PEP 8 fixes --- gitdb/exc.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gitdb/exc.py') diff --git a/gitdb/exc.py b/gitdb/exc.py index 7180fb5..47fc809 100644 --- a/gitdb/exc.py +++ b/gitdb/exc.py @@ -7,17 +7,17 @@ from util import to_hex_sha class ODBError(Exception): """All errors thrown by the object database""" - + class InvalidDBRoot(ODBError): """Thrown if an object database cannot be initialized at the given path""" - + class BadObject(ODBError): - """The object with the given SHA does not exist. Instantiate with the + """The object with the given SHA does not exist. Instantiate with the failed sha""" - + def __str__(self): return "BadObject: %s" % to_hex_sha(self.args[0]) - + class ParseError(ODBError): """Thrown if the parsing of a file failed due to an invalid format""" -- cgit v1.2.1 From b6c493deb2341fb843d71b66b2aa23078638755c Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Sun, 13 Jul 2014 15:41:15 -0400 Subject: Pick off the low hanging fruit This fixes most of the import errors that came from using the implicit relative imports that Python 2 supports. This also fixes the use of `xrange`, which has replaced `range` in Python 3. The same has happened for `izip`, which is also being aliased. The octal number syntax changed in Python 3, so we are now converting from strings using the `int` built-in function, which will produce the same output across both versions of Python. --- gitdb/exc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gitdb/exc.py') diff --git a/gitdb/exc.py b/gitdb/exc.py index 47fc809..73f84d2 100644 --- a/gitdb/exc.py +++ b/gitdb/exc.py @@ -3,7 +3,7 @@ # This module is part of GitDB and is released under # the New BSD License: http://www.opensource.org/licenses/bsd-license.php """Module with common exceptions""" -from util import to_hex_sha +from gitdb.util import to_hex_sha class ODBError(Exception): """All errors thrown by the object database""" -- cgit v1.2.1