Пример #1
0
 def done(result=None):
     if action == 'list':
         print_list(result, options.details)
     elif action == 'create':
         print_success('Resource created. ID: ' + result.id)
     elif action == 'update':
         print_success('Resource has been successfully updated')
     elif action == 'delete':
         if result:
             print_success('Resource deleted')
         else:
             print_success('Resource not deleted')
     elif result:
         pprint(result)
Пример #2
0
 def done(result=None):
     if action == 'list':
         print_list(result, options.details)
     elif action == 'create':
         print_success('Resource created. ID: ' + result.id)
     elif action == 'update':
         print_success('Resource has been successfully updated')
     elif action == 'delete':
         if result:
             print_success('Resource deleted')
         else:
             print_success('Resource not deleted')
     elif result:
         pprint(result)