summaryrefslogtreecommitdiffstats
path: root/src/git_tftpd/backend.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/git_tftpd/backend.py')
-rw-r--r--src/git_tftpd/backend.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/git_tftpd/backend.py b/src/git_tftpd/backend.py
index 6fae5bd..2d45916 100644
--- a/src/git_tftpd/backend.py
+++ b/src/git_tftpd/backend.py
@@ -7,12 +7,11 @@ from tftp.util import deferred
from twisted.python.context import get
from twisted.python.filepath import FilePath, InsecurePath
-from zope import interface
+from zope.interface import implementer
+@implementer(IBackend)
class GitBackend(object):
- interface.implements(IBackend)
-
def __init__(self, base_path):
self.base_path = base_path
self.base = FilePath(base_path)
@@ -25,6 +24,6 @@ class GitBackend(object):
def get_writer(self, file_name):
try:
target_path = self.base.descendant(file_name.split("/"))
- except InsecurePath, e:
+ except InsecurePath as e:
raise AccessViolation("Insecure path: %s" % e)
return GitWriter(target_path, self.base_path, get('remote'))