Esempio n. 1
0
 def open(self, type='r'):
     """Recorded.open(type='r') -> file or FileTransfer object"""
     return ftopen("myth://%s@%s/%s" % ( self.storagegroup,
                                         self.hostname,
                                         self.basename),
                   type, db=self._db,
                   chanid=self.chanid, starttime=self.starttime)
Esempio n. 2
0
 def __call__(self, mode='r', nooverwrite=False):
     if self.inst.host == '':
         raise MythFileError('File access only works '
                             'with Storage Group content')
     return ftopen('myth://%s@%s/%s' % ( self.sgroup,
                                         self.inst.host,
                                         self.inst[self.type]),
                             mode, False, nooverwrite, self.inst._db)
Esempio n. 3
0
 def __call__(self, mode='r', nooverwrite=False):
     if self.inst.host == '':
         raise MythFileError('File access only works '
                             'with Storage Group content')
     return ftopen(
         'myth://%s@%s/%s' %
         (self.sgroup, self.inst.host, self.inst[self.type]), mode,
         False, nooverwrite, self.inst._db)
Esempio n. 4
0
 def open(self, type='r'):
     """Recorded.open(type='r') -> file or FileTransfer object"""
     return ftopen("myth://%s@%s/%s" %
                   (self.storagegroup, self.hostname, self.basename),
                   type,
                   db=self._db,
                   chanid=self.chanid,
                   starttime=self.starttime)
Esempio n. 5
0
 def __call__(self, mode="r", nooverwrite=False):
     if self.inst.host == "":
         raise MythFileError("File access only works " "with Storage Group content")
     return ftopen(
         "myth://%s@%s/%s" % (self.sgroup, self.inst.host, self.inst[self.type]),
         mode,
         False,
         nooverwrite,
         self.inst._db,
     )
Esempio n. 6
0
 def open(self, mode='r', nooverwrite=False):
     return ftopen('myth://Videos@{0.host}/{0.filename}'.format(self),
                 mode, False, nooverwrite, self._db)
Esempio n. 7
0
 def open(self, mode='r'):
     return ftopen('myth://{0.imagetype}@{0.hostname}/{0}'.format(self), mode)