def get_app_dict(self, verbose=False): # print self.applist_url import apps apps.update_cache(url=self.applist_url, verbose=verbose) dic = apps.cache_to_dict() return dic
def upload_appshare(self, args): """ Start Web Server """ self.parser.add_option("-d", "--description", help="Set Description", default="", dest="description") # self.parser.add_option('-p', '--port', help='Set TCP Port number for web server', type='int', default=8000, dest='port') options, argv = self.parse_args(args[:]) verbose = options.verbose_flag # This is default option description = options.description wasanbon.arg_check(argv, 4) filepath = argv[3] if not os.path.isfile(filepath): sys.stdout.write(" - file (%s) not found.\n") import apps apps.update_cache(url=self.applist_url, verbose=verbose) dic = self.get_setting_dic() user = dic["user"] password = dic["password"] apps.upload( filepath, user, password, self.applist_filename, hostname=self.upload_host, dir=self.upload_dir, description=description, ) return 0
def upload_appshare(self, args): """ Start Web Server """ self.parser.add_option('-d', '--description', help='Set Description', default="", dest='description') #self.parser.add_option('-p', '--port', help='Set TCP Port number for web server', type='int', default=8000, dest='port') options, argv = self.parse_args(args[:]) verbose = options.verbose_flag # This is default option description = options.description wasanbon.arg_check(argv, 4) filepath = argv[3] if not os.path.isfile(filepath): sys.stdout.write(' - file (%s) not found.\n') import apps apps.update_cache(url=self.applist_url, verbose=verbose) dic = self.get_setting_dic() user = dic['user'] password = dic['password'] apps.upload(filepath, user, password, self.applist_filename, hostname=self.upload_host, dir=self.upload_dir, description=description) return 0
def get_app_dict(self): # print self.applist_url import apps apps.update_cache(url=self.applist_url) dic = apps.cache_to_dict() return dic