summaryrefslogtreecommitdiffstats
path: root/src/git_tftpd/backend.py
diff options
context:
space:
mode:
authorAlexander <alex@spline.inf.fu-berlin.de>2020-09-15 21:26:53 +0200
committerAlexander <alex@spline.inf.fu-berlin.de>2020-09-15 21:26:53 +0200
commit3f7505a50bc6b9b14809f921e977b13c69319db2 (patch)
treec85f5838a9bd28f2b3dd4376ccbf44f3904a2bf5 /src/git_tftpd/backend.py
parent27b3ebd4eb55174e67c643d864458371ad89eb66 (diff)
downloadgit-tftpd-3f7505a50bc6b9b14809f921e977b13c69319db2.tar.gz
git-tftpd-3f7505a50bc6b9b14809f921e977b13c69319db2.tar.bz2
git-tftpd-3f7505a50bc6b9b14809f921e977b13c69319db2.zip
Update to python3HEADmaster
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'))