Fetcher ve Archive içerisindeki "actions" bizim actions.py ile yanlış anlaşılabilir. Bu dosyalardaki actions'ı handlers olarak değiştirdim.
actions -> handlers
This commit is contained in:
+2
-2
@@ -89,7 +89,7 @@ class Archive:
|
||||
"""accepted archive types:
|
||||
targz, tarbz2, zip, tar"""
|
||||
|
||||
actions = {
|
||||
handlers = {
|
||||
'targz': ArchiveTarFile,
|
||||
'tarbz2': ArchiveTarFile,
|
||||
'tar': ArchiveTarFile,
|
||||
@@ -97,7 +97,7 @@ class Archive:
|
||||
}
|
||||
|
||||
type = ctx.spec.source.archiveType
|
||||
self.archive = actions.get(type)(ctx)
|
||||
self.archive = handlers.get(type)(ctx)
|
||||
|
||||
def unpack(self, targetDir):
|
||||
self.archive.unpack(targetDir)
|
||||
|
||||
+2
-2
@@ -45,11 +45,11 @@ class Fetcher:
|
||||
|
||||
scheme_err = lambda: self.err("unexpected scheme")
|
||||
|
||||
actions = {
|
||||
handlers = {
|
||||
'file': self.fetchLocalFile,
|
||||
'http': self.fetchRemoteFile,
|
||||
'ftp' : self.fetchRemoteFile
|
||||
}; actions.get(self.scheme, scheme_err)()
|
||||
}; handlers.get(self.scheme, scheme_err)()
|
||||
|
||||
return self.filedest + "/" + self.filename
|
||||
|
||||
|
||||
Reference in New Issue
Block a user