Changeset ff2d928
- Timestamp:
- Dec 2, 2008 5:17:02 PM (16 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
- Children:
- e087a7a
- Parents:
- b0b9499
- Location:
- fedd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/confirm_sshkey.py
rb0b9499 rff2d928 19 19 self.add_option('-q', '--quiet', dest='verbose', action='store_false', 20 20 default=True, help="No output") 21 self.add_option('-C', dest= dummy,21 self.add_option('-C', dest='dummy', 22 22 help="Compatibility option, no function") 23 23 … … 61 61 query = query_template % (user, key) 62 62 63 db = MySQLdb.connect(db='tbdb') 63 try: 64 db = MySQLdb.connect(db='tbdb') 65 except Exception, e: 66 if len(e.args) == 2: 67 num, str = e.args 68 else: 69 str = unicode(e) 70 num = -1 71 sys.exit("Cannot connect: %s (%d)" % (str, num)) 72 64 73 c = db.cursor() 65 74 c.execute(query) -
fedd/user_to_project.py
rb0b9499 rff2d928 10 10 sys.exit("Usage %s user project" % sys.argv[0]) 11 11 12 db = MySQLdb.connect(db='tbdb') 12 try: 13 db = MySQLdb.connect(db='tbdb') 14 except Exception, e: 15 if len(e.args) == 2: 16 num, str = e.args 17 else: 18 str = unicode(e) 19 num = -1 20 sys.exit("Cannot connect: %s (%d)" % (str, num)) 21 13 22 c = db.cursor() 14 23 c.execute("select uid, uid_idx from users where uid=%s", (user,))
Note: See TracChangeset
for help on using the changeset viewer.