예제 #1
0
 def _init_storage(self):
     storage_folder = self.config.get('general', 'storage_folder')
     if not storage_folder:
         storage_folder = os.path.join(USERDIR, 'Downloads')
     self.log.debug("Storage: {0}".format(storage_folder))
     makedirs(storage_folder)
     space_size = format.size(availspace(storage_folder))
     self.log.info(_("Available storage space: {0}").format(space_size))
예제 #2
0
파일: init.py 프로젝트: vuolter/pyload
 def _init_storage(self):
     storage_folder = self.config.get('general', 'storage_folder')
     if not storage_folder:
         storage_folder = os.path.join(USERDIR, 'Downloads')
     self.log.debug("Storage: {0}".format(storage_folder))
     makedirs(storage_folder)
     space_size = format.size(availspace(storage_folder))
     self.log.info(_("Available storage space: {0}").format(space_size))
예제 #3
0
파일: init.py 프로젝트: Prof222/pyload
 def _setup_storage(self):
     storage_folder = self.config.get('general', 'storage_folder')
     if not storage_folder:
         storage_folder = os.path.join(USERDIR, self.DEFAULT_STORAGEDIRNAME)
     self.log.debug("Storage: {0}".format(storage_folder))
     makedirs(storage_folder, exist_ok=True)
     avail_space = format.size(availspace(storage_folder))
     self.log.info(
         self._("Available storage space: {0}").format(avail_space))
예제 #4
0
    def _setup_storage(self):
        self.log.debug('Setup storage...')

        storage_folder = self.config.get('general', 'storage_folder')
        if storage_folder is None:
            storage_folder = os.path.join(builtins.USERDIR,
                                          self.DEFAULT_STORAGENAME)
        self.log.info(self._('Storage: {0}'.format(storage_folder)))
        makedirs(storage_folder, exist_ok=True)
        avail_space = format.size(availspace(storage_folder))
        self.log.info(
            self._('Available storage space: {0}').format(avail_space))
예제 #5
0
파일: base.py 프로젝트: GammaC0de/pyload
    def _setup_storage(self):
        self.log.debug('Setup storage...')

        storage_folder = self.config.get('general', 'storage_folder')
        if storage_folder is None:
            storage_folder = os.path.join(
                builtins.USERDIR, self.DEFAULT_STORAGENAME)
        self.log.info(self._('Storage: {0}'.format(storage_folder)))
        makedirs(storage_folder, exist_ok=True)
        avail_space = format.size(availspace(storage_folder))
        self.log.info(
            self._('Available storage space: {0}').format(avail_space))
예제 #6
0
 def format_trafficleft(self):
     if self.trafficleft is None:
         self.get_account_info(force=True)
     return format.size(self.trafficleft << 10)
예제 #7
0
파일: account.py 프로젝트: GammaC0de/pyload
 def format_trafficleft(self):
     if self.trafficleft is None:
         self.get_account_info(force=True)
     return format.size(self.trafficleft << 10)