Browse Source

fix: change methods not using their bound instance to static methods (#3582)

* Add function decorators to 2 methods

Change methods not using their bound instance to static methods
Adithya Hegde 4 years ago
parent
commit
e0488d51ab
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lgsm/functions/query_gsquery.py

+ 2 - 1
lgsm/functions/query_gsquery.py

@@ -59,10 +59,12 @@ class gsquery:
         self.response = None
         self.response = None
         self.sanity_checks()
         self.sanity_checks()
 
 
+	@staticmethod
     def fatal_error(self, error_message, error_code=1):
     def fatal_error(self, error_message, error_code=1):
         sys.stderr.write('ERROR: ' + str(error_message) + '\n')
         sys.stderr.write('ERROR: ' + str(error_message) + '\n')
         sys.exit(error_code)
         sys.exit(error_code)
 
 
+	@staticmethod
     def exit_success(self, success_message=''):
     def exit_success(self, success_message=''):
         sys.stdout.write('OK: ' + str(success_message) + '\n')
         sys.stdout.write('OK: ' + str(success_message) + '\n')
         sys.exit(0)
         sys.exit(0)
@@ -140,6 +142,5 @@ if __name__ == '__main__':
         help='Display debugging output.'
         help='Display debugging output.'
     )
     )
     options, arguments = parser.parse_args()
     options, arguments = parser.parse_args()
-    #
     server = gsquery(options, arguments)
     server = gsquery(options, arguments)
     server.responding()
     server.responding()