Пример #1
0
 def __init__(self, aes_crypto):
     if not data.file_exists(utils.CLOUD_MAP_FILE_NAME):
         logger.info('Create cloud map')
         self.create_cloud_map()
     cloud_map = self.load_cloud_map()
     self.aes_crypto = aes_crypto
     self.token = cloud_map[0]
     self.cloud_init = cloud_map[1]
     self.dbx = self.get_dropbox_access(self.token)
Пример #2
0
 def __init__(self, aes_crypto):
     if not data.file_exists(utils.CLOUD_MAP_FILE_NAME):
         logger.info('Create cloud map')
         self.create_cloud_map()
     cloud_map = self.load_cloud_map()
     self.aes_crypto = aes_crypto
     self.token = cloud_map[0]
     self.cloud_init = cloud_map[1]
     self.dbx = self.get_dropbox_access(self.token)
Пример #3
0
 def __init__(self):
     if not data.file_exists(utils.FILE_MAP_FILE_NAME):
         with data.open_data_file(utils.FILE_MAP_FILE_NAME,
                                  utils.WRITE_MODE) as file_map:
             json.dump({
                 JSON_FILES: (),
                 JSON_ID_COUNTER: 0
             },
                       file_map,
                       indent=2)
Пример #4
0
 def __init__(self):
     if not data.file_exists(utils.POSITION_MAP_FILE_NAME):
         with data.open_data_file(utils.POSITION_MAP_FILE_NAME,
                                  utils.WRITE_MODE) as position_map:
             json.dump((), position_map, indent=2)
Пример #5
0
 def __init__(self):
     if not data.file_exists(utils.POSITION_MAP_FILE_NAME):
         with data.open_data_file(utils.POSITION_MAP_FILE_NAME, utils.WRITE_MODE) as position_map:
             json.dump((), position_map, indent=2)
Пример #6
0
 def __init__(self):
     if not data.file_exists(utils.FILE_MAP_FILE_NAME):
         with data.open_data_file(utils.FILE_MAP_FILE_NAME, utils.WRITE_MODE) as file_map:
             json.dump({JSON_FILES: (), JSON_ID_COUNTER: 0}, file_map, indent=2)
Пример #7
0
 def has_signed_up(self):
     return data.file_exists(utils.KEY_MAP_FILE_NAME) and KeyFile.verify_content()
Пример #8
0
 def has_signed_up(self):
     return data.file_exists(
         utils.KEY_MAP_FILE_NAME) and KeyFile.verify_content()