User Tools

Site Tools


acceso_a_bases_isis_desde_python

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
acceso_a_bases_isis_desde_python [04/05/2009 11:23]
fernando
acceso_a_bases_isis_desde_python [26/01/2010 03:42]
newacct
Line 151: Line 151:
         #           books = IsisDb('/​path/​to/​books'​) ​             # check master existence, raise exception if it does not exist  ​         #           books = IsisDb('/​path/​to/​books'​) ​             # check master existence, raise exception if it does not exist  ​
         #           users = IsisDb('/​path/​to/​users',​ create=True) # create unconditionally,​ don't check existence         #           users = IsisDb('/​path/​to/​users',​ create=True) # create unconditionally,​ don't check existence
-        if '​create'​ in args.keys() and args['​create'​] == True:+        if args.get('​create'​):
             self.__create()             self.__create()
         elif not self.__exists():​         elif not self.__exists():​
Line 172: Line 172:
         """​         """​
         resp = self.get_status() ​         resp = self.get_status() ​
-        ​if resp['​database'​]['​status'​]['​master'​] ​== 'not found'+        ​return ​resp['​database'​]['​status'​]['​master'​] ​!= 'not found'
-            return False +
-        else: +
-            return True+
  
     def __doTask(self,​ script, params, content=None):​     def __doTask(self,​ script, params, content=None):​
acceso_a_bases_isis_desde_python.txt · Last modified: 26/01/2010 00:00 (external edit)