Changeset 0adc119c25eb7341fe2fb4e0f1275eaf2c2c9e34
- Timestamp:
- 05/30/07 10:26:56 (6 years ago)
- Author:
- iacopo <iacopo@…>
- Children:
- b6ca4f7b572c7c6263cca50968092fdf34575a4b
- Parents:
- 37f5584b8cf05d997d8aa54f5365c007c5ef1190
- git-committer:
- iacopo <iacopo@…> (05/30/07 10:26:56)
- Message:
-
Removed print.
Added log.debug()
git-svn-id: https://labs.truelite.it/svn/octofuss/trunk@355 5a101938-5c21-0410-9b5a-a83d6f3706a9
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r624195c
|
r0adc119
|
|
| 17 | 17 | |
| 18 | 18 | from octofuss.utils import hostup |
| 19 | | from octofuss import art,config |
| | 19 | from octofuss import art,config,log |
| 20 | 20 | |
| 21 | 21 | |
| … |
… |
|
| 293 | 293 | def on_host_select(self,icon_view, clusterPath): |
| 294 | 294 | selected = icon_view.get_selected_items() |
| 295 | | print selected |
| 296 | 295 | if selected: |
| 297 | 296 | self.show_context_menu_host(None, (clusterPath,selected[0][0])) |
| … |
… |
|
| 397 | 396 | self.change_app_content(s) |
| 398 | 397 | except Exception, e: |
| 399 | | print e |
| | 398 | log.debug(str(e)) |
| 400 | 399 | self.restartRequired = True |
| 401 | 400 | self.__error_dialog(str(e)) |
| … |
… |
|
| 424 | 423 | cluster = res[0] |
| 425 | 424 | host = res[1] |
| 426 | | print "Removing host "+host+" in cluster "+cluster |
| | 425 | log.debug("Removing host "+host+" in cluster "+cluster) |
| 427 | 426 | self.network[cluster].del_host(host) |
| 428 | 427 | self.network.save() |
| … |
… |
|
| 524 | 523 | pass |
| 525 | 524 | except Exception, e: |
| 526 | | print e |
| | 525 | log.debug(str(e)) |
| 527 | 526 | |
| 528 | 527 | def host_item_event(self,obj,event, cluster, clusterPath): |
| … |
… |
|
| 539 | 538 | pass |
| 540 | 539 | except Exception, e: |
| 541 | | print e |
| | 540 | log.debug(str(e)) |
| 542 | 541 | |
| 543 | 542 | |
-
|
r4f202e0
|
r0adc119
|
|
| 16 | 16 | import octofuss.config as config |
| 17 | 17 | from octofuss.error import LdapError |
| | 18 | from octofuss import log |
| 18 | 19 | |
| 19 | 20 | CFGSEC = "LDAP" |
| … |
… |
|
| 57 | 58 | result_set.append(result_data) |
| 58 | 59 | if len(result_set) == 0: |
| 59 | | print "No Results." |
| | 60 | log.debug("No Results.") |
| 60 | 61 | end = False |
| 61 | 62 | return None |
| … |
… |
|
| 78 | 79 | con.modify_s(dn,mod) |
| 79 | 80 | else: |
| 80 | | print "Invalid dn entry to modify" |
| | 81 | log.debug("Invalid dn entry to modify") |
| 81 | 82 | raise LdapError("Invalid dn argument") |
| 82 | 83 | return oldEntry |
-
|
r843f87b0
|
r0adc119
|
|
| 15 | 15 | import gtk |
| 16 | 16 | import gobject |
| | 17 | from octofuss import log |
| 17 | 18 | from octofuss.error import DbEntry |
| 18 | 19 | from octofuss.cluster import * |
| … |
… |
|
| 205 | 206 | |
| 206 | 207 | def resp(self,response): |
| 207 | | print response |
| | 208 | log.debug(response) |
| 208 | 209 | |
| 209 | 210 | |
| … |
… |
|
| 351 | 352 | numSel = selections[1][0][0] |
| 352 | 353 | except IndexError: |
| 353 | | print "You must select a valid row!" |
| | 354 | log.debug("You must select a valid row!") |
| 354 | 355 | return |
| 355 | 356 | |
| … |
… |
|
| 512 | 513 | |
| 513 | 514 | def changed(self , editable, treeview, entry): |
| 514 | | print editable.get_chars(0,-1) |
| | 515 | log.debug(editable.get_chars(0,-1)) |
| 515 | 516 | |
| 516 | 517 | def insert(self, editable, treeview, entry): |
| … |
… |
|
| 595 | 596 | dict = {} |
| 596 | 597 | dict = [ adict[key] for key in self.dictSort(adict.keys()) ] |
| 597 | | print dict.keys() |
| | 598 | log.debug(dict.keys()) |
| 598 | 599 | return dict |
| 599 | 600 | |
| … |
… |
|
| 624 | 625 | |
| 625 | 626 | def remove_clicked(self,button, treeview): |
| 626 | | print "Da implementare" |
| | 627 | log.debug("Da implementare") |
| 627 | 628 | |
| 628 | 629 | def showDialog(self, message, type): |
-
|
rb09598d
|
r0adc119
|
|
| 2 | 2 | from octofuss import config |
| 3 | 3 | from octofuss import db |
| | 4 | from octofuss import log |
| 4 | 5 | import sqlite |
| 5 | 6 | from octofuss.packages.progressbar import * |
| … |
… |
|
| 34 | 35 | def updatePackages(self): |
| 35 | 36 | """ Delete all packages and fill the Packages table """ |
| 36 | | print "Updating packages table..." |
| | 37 | log.debug("Updating packages table...") |
| 37 | 38 | self.cursor.execute("delete from packages") |
| 38 | 39 | self.__insertPackages() |
-
|
r843f87b0
|
r0adc119
|
|
| 19 | 19 | from octofuss.error import DbEntry |
| 20 | 20 | from octofuss import db |
| | 21 | from octofuss import log |
| 21 | 22 | from octofuss.cluster import * |
| 22 | 23 | |
| … |
… |
|
| 41 | 42 | cur.execute("insert into 'install_queue' (hostname,package,status,inserttime) values (%s,%s,%s,%s)", entry) |
| 42 | 43 | else: |
| 43 | | print "Error inserting package." |
| | 44 | log.debug("Error inserting package.") |
| 44 | 45 | |
| 45 | 46 | def get_install_queue(self): |
-
|
ra9fd8e2
|
r0adc119
|
|
| 17 | 17 | from octofuss.error import MissingConfigurationFile |
| 18 | 18 | from octofuss.error import BadConfigurationFile |
| | 19 | from octofuss import log |
| 19 | 20 | |
| 20 | 21 | class ShareModel: |
| … |
… |
|
| 49 | 50 | name = shareObj.getName() |
| 50 | 51 | if string.upper(name) in self.__serverParams: |
| 51 | | print "Share name must be different from samba params!" |
| | 52 | log.debug("Share name must be different from samba params!") |
| 52 | 53 | raise NameError("Share name must be different from samba params!") |
| 53 | 54 | return |
| 54 | 55 | if self.__conf.isService(name): |
| 55 | | print "Share already exist!" |
| | 56 | log.debug("Share already exist!") |
| 56 | 57 | raise NameError("Share already exists") |
| 57 | 58 | return |
| … |
… |
|
| 63 | 64 | self.__conf.Write(self.__sambaConfigFile) |
| 64 | 65 | else: |
| 65 | | print "Share not valid!" |
| | 66 | log.debug("Share not valid!") |
| 66 | 67 | raise Error("Share not valid") |
| 67 | 68 | |
| … |
… |
|
| 73 | 74 | self.__conf.Write(self.__sambaConfigFile) |
| 74 | 75 | else: |
| 75 | | print "You can't remove samba server params!" |
| | 76 | log.debug("You can't remove samba server params!") |
| 76 | 77 | |
| 77 | 78 | def getAllServices(self): |
| … |
… |
|
| 107 | 108 | self.__conf.Write(self.__sambaConfigFile) |
| 108 | 109 | else: |
| 109 | | print "You can't modify samba server params!" |
| | 110 | log.debug("You can't modify samba server params!") |
| 110 | 111 | |
| 111 | 112 | def printConf(self): |
-
|
r6ecf068
|
r0adc119
|
|
| 3 | 3 | import string |
| 4 | 4 | import os |
| | 5 | from octofuss import log |
| 5 | 6 | from octofuss.samba import config |
| 6 | 7 | #from octofuss import users |
| … |
… |
|
| 267 | 268 | |
| 268 | 269 | except Exception, e: |
| 269 | | print e |
| | 270 | log.debug(str(e)) |
| 270 | 271 | dialog = gtk.MessageDialog(type=gtk.MESSAGE_ERROR, message_format="Check share options!", buttons=gtk.BUTTONS_OK) |
| 271 | 272 | dialog.show_all() |
-
|
r0564122
|
r0adc119
|
|
| 15 | 15 | import vte |
| 16 | 16 | import gtk |
| | 17 | from octofuss import log |
| 17 | 18 | |
| 18 | 19 | class SshTerm(vte.Terminal): |
| … |
… |
|
| 33 | 34 | self.fork_command("sh") |
| 34 | 35 | self.feed_child("clear\n") |
| 35 | | print "SSH TO HOST:" , hostname |
| | 36 | log.debug("SSH TO HOST:"+ hostname) |
| 36 | 37 | command = "exec ssh -q -t %s\n" % hostname |
| 37 | 38 | self.feed_child(command) |
-
|
r56ad41b
|
r0adc119
|
|
| 26 | 26 | |
| 27 | 27 | from octofuss import ldap |
| 28 | | |
| | 28 | from octofuss import log |
| 29 | 29 | from octofuss.ldap import objectclass |
| 30 | 30 | from octofuss.ldap.objectclass import * |
| … |
… |
|
| 163 | 163 | for attr in self.objectClass[objClass].required.keys(): # Each required attribute |
| 164 | 164 | if not self.objectClass[objClass].required[attr].check(): |
| 165 | | print "REQ: "+ attr |
| 166 | | print self.objectClass[objClass].required[attr].getValue() |
| | 165 | #log.debug(self.objectClass[objClass].required[attr].getValue()) |
| 167 | 166 | return False |
| 168 | 167 | |
| … |
… |
|
| 170 | 169 | if self.objectClass[objClass].optional[attr].getValue(): |
| 171 | 170 | if not self.objectClass[objClass].optional[attr].check() and isSettable(): |
| 172 | | print "OPT: " +attr |
| 173 | | print self.objectClass[objClass].optional[attr].getValue() |
| | 171 | #log.debug(self.objectClass[objClass].optional[attr].getValue()) |
| 174 | 172 | return False |
| 175 | 173 | |
| … |
… |
|
| 332 | 330 | |
| 333 | 331 | groupList[groupName]=group |
| 334 | | #print "Unix group: ", group.getAttribute("cn").getValue(), group.getAttribute("userPassword").getValue(), group.getAttribute("gidNumber").getValue(),group.getAttribute("memberUid").getValue() |
| | 332 | #log.debug("Unix group: "+ group.getAttribute("cn").getValue()) |
| 335 | 333 | |
| 336 | 334 | |
| … |
… |
|
| 366 | 364 | |
| 367 | 365 | except Exception, e: |
| 368 | | print e |
| | 366 | log.debug(str(e)) |
| 369 | 367 | raise GroupError("Could not add ldap group: required attribute missing!") |
| 370 | 368 | |
| … |
… |
|
| 385 | 383 | except: |
| 386 | 384 | attrs_missing.append(param) |
| 387 | | #print "Attribute %s not found" % param |
| 388 | | |
| 389 | | #print "Ldap Group added: ", ldapgroup.getName().getValue() |
| | 385 | log.debug("Attribute %s not found" % param) |
| | 386 | |
| | 387 | log.debug("Ldap Group added: "+ ldapgroup.getName().getValue()) |
| 390 | 388 | |
| 391 | 389 | except GroupError, e: |
| 392 | | print e |
| | 390 | log.debug(str(e)) |
| 393 | 391 | try: |
| 394 | 392 | p = "" |
| 395 | 393 | for i in attrs_missing: p = p +" "+ i |
| 396 | | print "Group not added: option missing:\n"+p |
| | 394 | log.debug("Group not added: option missing:\n"+p) |
| 397 | 395 | |
| 398 | 396 | except: |
| 399 | | print "eccezione" |
| | 397 | log.debug("eccezione") |
| 400 | 398 | pass |
| 401 | 399 | continue |
| 402 | 400 | except NameError,e: |
| 403 | | print e |
| 404 | | print "Group not added: empty name" |
| | 401 | lgo.debug(str(e)) |
| | 402 | log.debug( "Group not added: empty name" ) |
| 405 | 403 | continue |
| 406 | 404 | |
| 407 | 405 | if grouplist.has_key(ldapgroup.getName().getValue()): |
| 408 | | print "Ldap group "+ldapgroup.getName().getValue()+" already present in system groups." |
| | 406 | log.debug( "Ldap group "+ldapgroup.getName().getValue()+" already present in system groups.") |
| 409 | 407 | continue |
| 410 | 408 | if objectList.has_key(ldapgroup.getName().getValue()): |
| … |
… |
|
| 472 | 470 | except: |
| 473 | 471 | pass |
| 474 | | #print "Attribute %s not found" % param |
| 475 | | |
| 476 | | #print "Ldap User added: ", ldapuser.getName().getValue() |
| | 472 | log.debug( "Attribute %s not found" % param) |
| | 473 | |
| | 474 | log.debug( "Ldap User added: "+ ldapuser.getName().getValue()) |
| 477 | 475 | |
| 478 | 476 | except UserError, e: |
| 479 | | print "Warning: User '"+ldapuser.getUid().getValue()+"' not added. Option missing: "+str(e) |
| | 477 | log.debug( "Warning: User '"+ldapuser.getUid().getValue()+"' not added. Option missing: "+str(e)) |
| 480 | 478 | continue |
| 481 | 479 | except NameError, e: |
| 482 | | print e |
| 483 | | print "User not added: empty name" |
| | 480 | log.debug(str(e)) |
| | 481 | log.debug("User not added: empty name") |
| 484 | 482 | continue |
| 485 | 483 | |
| … |
… |
|
| 488 | 486 | raise UserError("Incongruous ldap tree\nDuplicate user name in ldap server: "+ldapuser.getName().getValue()) |
| 489 | 487 | if locallist.has_key(ldapuser.getName().getValue()): |
| 490 | | print "Ldap user "+ldapuser.getName().getValue()+" already present in system users." |
| | 488 | log.debug("Ldap user "+ldapuser.getName().getValue()+" already present in system users.") |
| 491 | 489 | continue |
| 492 | 490 | objectList[ldapuser.getName().getValue()]=ldapuser |
| … |
… |
|
| 532 | 530 | raise UserError("Duplicate user in unix user file") |
| 533 | 531 | userlist[user.getName().getValue()]= user |
| 534 | | #print "Unix user: ", user.getAttribute("cn").getValue(), user.getAttribute("userPassword").getValue(), user.getAttribute("uidNumber").getValue(), user.getAttribute("gidNumber").getValue() , user.getAttribute("gecos").getValue(), user.getAttribute("homeDirectory").getValue(),user.getAttribute("loginShell").getValue() |
| | 532 | #log.debug("Unix user: "+ user.getAttribute("cn").getValue()) |
| 535 | 533 | |
| 536 | 534 | |
| … |
… |
|
| 859 | 857 | useradd = useradd + " -G "+ groups + " " |
| 860 | 858 | useradd = useradd + username |
| 861 | | print useradd |
| | 859 | log.debug(useradd + " added") |
| 862 | 860 | sts = os.system(useradd) |
| 863 | 861 | if sts != 0: |
| … |
… |
|
| 865 | 863 | #sts = os.waitpid(p.pid, 0) |
| 866 | 864 | #if sts[1] != 0: |
| 867 | | print "Removing user..." |
| | 865 | log.debug("Removing user...") |
| | 866 | |
| 868 | 867 | os.system("userdel "+username) |
| 869 | 868 | raise UserError("Problem adding user!") |
| … |
… |
|
| 1166 | 1165 | |
| 1167 | 1166 | except Exception, e: |
| 1168 | | print e |
| | 1167 | log.debug(str(e)) |
| 1169 | 1168 | raise UserError("Could not change password") |
| 1170 | 1169 | |
| … |
… |
|
| 1215 | 1214 | raise UserError("User passed is not a valid user") |
| 1216 | 1215 | except Exception, e: |
| 1217 | | print e |
| | 1216 | log.debug( str(e)) |
| 1218 | 1217 | raise UserError("Problems: "+str(e)) |
| 1219 | 1218 | |
| … |
… |
|
| 1341 | 1340 | for user in users: |
| 1342 | 1341 | if not self.isUser(user): |
| 1343 | | print "Warning: User \""+user+"\" doesn't exist but is in unix group." |
| | 1342 | log.debug( "Warning: User \""+user+"\" doesn't exist but is in unix group.") |
| 1344 | 1343 | #TODO |
| 1345 | 1344 | #raise GroupError("User doesn't exist!") |
| … |
… |
|
| 1352 | 1351 | for user in users: |
| 1353 | 1352 | if not self.isUser(user): |
| 1354 | | print "Warning: User \""+user+"\" doesn't exist but is in unix group." |
| | 1353 | log.debug("Warning: User \""+user+"\" doesn't exist but is in unix group." ) |
| 1355 | 1354 | #TODO: decide what to do |
| 1356 | 1355 | #raise GroupError("User doesn't exist!") |
| … |
… |
|
| 1440 | 1439 | # Exist a group with same name of user |
| 1441 | 1440 | # User will be added to this group |
| 1442 | | print "Warning: a group with this name already exists. User will be added to this group." |
| | 1441 | lgo.debug( "Warning: a group with this name already exists. User will be added to this group.") |
| 1443 | 1442 | g = self.getGroup(l.getName().getValue()) |
| 1444 | 1443 | |
| … |
… |
|
| 1574 | 1573 | InheritableSingleton.instances['groupList'][group].removeUser(username) |
| 1575 | 1574 | if group in groups: |
| 1576 | | print "TRRR: "+group |
| 1577 | 1575 | |
| 1578 | 1576 | InheritableSingleton.instances['groupList'][group].addUser(newname) |
| … |
… |
|
| 1582 | 1580 | InheritableSingleton.instances['ldapGroupList'][group].removeUser(username) |
| 1583 | 1581 | if group in groups: |
| 1584 | | print "TRRR: "+group |
| 1585 | 1582 | |
| 1586 | 1583 | InheritableSingleton.instances['ldapGroupList'][group].addUser(newname) |
| … |
… |
|
| 1590 | 1587 | InheritableSingleton.instances['groupList'][group].removeUser(username) |
| 1591 | 1588 | if group in groups: |
| 1592 | | print "TRRR: "+group |
| 1593 | 1589 | InheritableSingleton.instances['groupList'][group].addUser(username) |
| 1594 | 1590 | |
| … |
… |
|
| 1597 | 1593 | InheritableSingleton.instances['ldapGroupList'][group].removeUser(username) |
| 1598 | 1594 | if group in groups: |
| 1599 | | print "TRRR: "+group |
| 1600 | 1595 | |
| 1601 | 1596 | InheritableSingleton.instances['ldapGroupList'][group].addUser(username) |
| … |
… |
|
| 1656 | 1651 | ret = conn.add_s(dn, modList) |
| 1657 | 1652 | else: |
| 1658 | | print "Not a valid Ldap Group!" |
| | 1653 | log.debug("Not a valid Ldap Group!") |
| 1659 | 1654 | except: |
| 1660 | 1655 | raise LdapError("Error: group not added!") |
| … |
… |
|
| 1676 | 1671 | curGroupGID = self.getGroup(groupname).getGid().getValue() |
| 1677 | 1672 | found = False |
| 1678 | | print curGroupGID |
| | 1673 | log.debug(curGroupGID ) |
| 1679 | 1674 | #Because of usList doesn't contain users main group, we have to search it |
| 1680 | 1675 | for us in InheritableSingleton.instances['ldapList'].keys(): |
| … |
… |
|
| 1685 | 1680 | |
| 1686 | 1681 | |
| 1687 | | print usList |
| | 1682 | |
| 1688 | 1683 | if not usList: |
| 1689 | 1684 | if not found: |
| … |
… |
|
| 1735 | 1730 | l.setUserList(users) |
| 1736 | 1731 | # Modify group |
| 1737 | | print l.getUsersList().getValue() |
| 1738 | 1732 | self.__modifyLdapGroup(l) |
| 1739 | 1733 | |
| … |
… |
|
| 1752 | 1746 | ret = ldap.modifyEntry(dn,d) |
| 1753 | 1747 | else: |
| 1754 | | print "Not a valid Ldap Group!" |
| | 1748 | log.debug("Not a valid Ldap Group!") |
| 1755 | 1749 | except: |
| 1756 | 1750 | raise LdapError("Error: could not modify group ") |
| … |
… |
|
| 1764 | 1758 | ret = ldap.modifyEntry(dn,d) |
| 1765 | 1759 | else: |
| 1766 | | print "Not a valid Ldap Group!" |
| | 1760 | log.debug( "Not a valid Ldap Group!") |
| 1767 | 1761 | except: |
| 1768 | 1762 | raise LdapError("Error: could not modify group ") |
| … |
… |
|
| 1872 | 1866 | ret = conn.add_s(dn, modList) |
| 1873 | 1867 | else: |
| 1874 | | print "Not a valid Ldap User!" |
| | 1868 | log.debug("Not a valid Ldap User!") |
| 1875 | 1869 | except Exception, e: |
| 1876 | | print e |
| 1877 | | print e.args |
| | 1870 | log.debug(str(e)) |
| 1878 | 1871 | raise LdapError("Error: user not added!") |
| 1879 | 1872 | |
| … |
… |
|
| 1934 | 1927 | else: |
| 1935 | 1928 | fileBackup = home + "-" + stringTime + ".bck" |
| 1936 | | print fileBackup |
| 1937 | 1929 | compress = self.dialogYesNo("Home backup in process\nDo you want to compress the backup and remove home directory?") |
| 1938 | 1930 | if compress == -8: |
| … |
… |
|
| 1956 | 1948 | showDialog("Backup done: "+fileBackup, gtk.MESSAGE_INFO) |
| 1957 | 1949 | except Exception,e: |
| 1958 | | print e |
| | 1950 | log.debug(str(e)) |
| 1959 | 1951 | showDialog("Problems doing backup of "+username+"'s home directory!",gtk.MESSAGE_ERROR) |
| 1960 | 1952 | else: |
| 1961 | | print "Home doesn't exist" |
| | 1953 | log.debug("Home doesn't exist") |
| 1962 | 1954 | |
| 1963 | 1955 | |
| … |
… |
|
| 2004 | 1996 | InheritableSingleton.instances['ldapList'][l.getName().getValue()]=l |
| 2005 | 1997 | else: |
| 2006 | | print "Not a valid Ldap User!" |
| | 1998 | log.debug("Not a valid Ldap User!") |
| 2007 | 1999 | |
| 2008 | 2000 | except: |
| … |
… |
|
| 2104 | 2096 | del usersList[ind] |
| 2105 | 2097 | if username in usersList: |
| 2106 | | print "Warning: duplicate user in group" |
| | 2098 | log.debug("Warning: duplicate user in group") |
| 2107 | 2099 | newLine = groupSplit[0]+":"+groupSplit[1]+":"+groupSplit[2]+":" |
| 2108 | 2100 | |
| … |
… |
|
| 2207 | 2199 | InheritableSingleton.instances['groupList'][group].addUser(username) |
| 2208 | 2200 | except Exception, e: |
| 2209 | | print e.args |
| 2210 | | |
| 2211 | 2201 | raise UserError("Problem updating system groups:\n"+str(e)) |
| 2212 | 2202 | |
-
|
r37f5584
|
r0adc119
|
|
| 19 | 19 | from octofuss import art |
| 20 | 20 | from octofuss import users |
| | 21 | from octofuss import log |
| 21 | 22 | from octofuss.users import backendSingleton |
| 22 | 23 | from octofuss.users import Backend |
| … |
… |
|
| 275 | 276 | |
| 276 | 277 | except Exception, e: |
| 277 | | print e |
| | 278 | log.debug(str(e)) |
| 278 | 279 | except TypeError,e: |
| 279 | 280 | pass |
| 280 | 281 | except Exception, e: |
| 281 | | print e |
| | 282 | log.debug(str(e)) |
| 282 | 283 | |
| 283 | 284 | |
| … |
… |
|
| 320 | 321 | |
| 321 | 322 | except Exception, e: |
| 322 | | print e |
| | 323 | log.debug(str(e)) |
| | 324 | |
| 323 | 325 | except TypeError,e: |
| 324 | 326 | pass |
| 325 | 327 | except Exception, e: |
| 326 | | print e |
| | 328 | e |
| 327 | 329 | |
| 328 | 330 | |
| … |
… |
|
| 569 | 571 | pass |
| 570 | 572 | except Exception,e: |
| 571 | | print e |
| | 573 | log.debug(str(e)) |
| 572 | 574 | |
| 573 | 575 | |
| … |
… |
|
| 632 | 634 | pass |
| 633 | 635 | except Exception,e: |
| 634 | | print e |
| | 636 | log.debug(str(e)) |
| | 637 | |
| 635 | 638 | |
| 636 | 639 | |
| … |
… |
|
| 875 | 878 | type = _("network") |
| 876 | 879 | else: |
| 877 | | print "Warning: problem identifying group type!" |
| | 880 | log.debug(_("Warning: problem identifying group type!")) |
| 878 | 881 | pix = art.get_pixbuf_from_name("stock_people") |
| 879 | 882 | |
| … |
… |
|
| 900 | 903 | type = _("network") |
| 901 | 904 | else: |
| 902 | | print "Warning: problem identifying group type!" |
| | 905 | log.debug(_("Warning: problem identifying group type!")) |
| | 906 | |
| 903 | 907 | model.set (iter, 0, item, 1, type ) |
| 904 | 908 | return model |
| … |
… |
|
| 989 | 993 | selectedItem = iconView.get_selected_items() |
| 990 | 994 | |
| 991 | | print selectedItem |
| 992 | 995 | values = [] |
| 993 | 996 | for it in selectedItem: |
| … |
… |
|
| 1022 | 1025 | backend.deleteLdapUser2(value) |
| 1023 | 1026 | else: |
| 1024 | | print "Invalid user" |
| | 1027 | log.debug(_("Invalid user")) |
| 1025 | 1028 | |
| 1026 | 1029 | iconView.set_model(self.__create_user_model_icon()) |
| … |
… |
|
| 1029 | 1032 | iconView.show() |
| 1030 | 1033 | except Exception, e: |
| 1031 | | print e.args |
| 1032 | | print type(e) |
| 1033 | | print dir(e) |
| | 1034 | log.debug(str(e)) |
| 1034 | 1035 | self.showDialog(str(e),gtk.MESSAGE_ERROR) |
| 1035 | 1036 | |
| … |
… |
|
| 1071 | 1072 | |
| 1072 | 1073 | else: |
| 1073 | | print "Invalid group" |
| | 1074 | log.debug(_("Invalid group")) |
| 1074 | 1075 | |
| 1075 | 1076 | iconView.set_model(self.__create_group_model_icon()) |
| … |
… |
|
| 1142 | 1143 | info.show() |
| 1143 | 1144 | except Exception, e: |
| 1144 | | print e |
| | 1145 | log.debug(str(e)) |
| 1145 | 1146 | self.showDialog("Invalid user!\n"+str(e),gtk.MESSAGE_ERROR) |
| 1146 | 1147 | |
| … |
… |
|
| 1194 | 1195 | |
| 1195 | 1196 | except Exception, e: |
| 1196 | | print e |
| | 1197 | log.debug(str(e)) |
| 1197 | 1198 | |
| 1198 | 1199 | |
| … |
… |
|
| 1226 | 1227 | info.show() |
| 1227 | 1228 | except Exception,e: |
| 1228 | | print e |
| | 1229 | log.debug(str(e)) |
| 1229 | 1230 | |
| 1230 | 1231 | class Info(gtk.Window): |
| … |
… |
|
| 1303 | 1304 | mainTable.attach(buttonEnable,0,1,5,6,yoptions=gtk.SHRINK,ypadding=10,xpadding=5) |
| 1304 | 1305 | else: |
| 1305 | | print "Is enabled returned None, problems" |
| | 1306 | log.debug("Is enabled returned None, problems") |
| 1306 | 1307 | mainTable.attach(buttonDisable,0,1,5,6,yoptions=gtk.SHRINK,ypadding=10,xpadding=5) |
| 1307 | 1308 | |
| … |
… |
|
| 1775 | 1776 | self.showDialog(_("Invalid characters in home directory field!"),gtk.MESSAGE_ERROR) |
| 1776 | 1777 | return |
| 1777 | | print dir |
| | 1778 | log.debug("Dirrecotry: "+dir) |
| 1778 | 1779 | n.setAttribute("homeDirectory",dir) |
| 1779 | 1780 | |
| … |
… |
|
| 1931 | 1932 | type = _("network") |
| 1932 | 1933 | else: |
| 1933 | | print "Warning: problem identifying group type!" |
| | 1934 | log.debug(_("Warning: problem identifying group type!")) |
| 1934 | 1935 | model.set (iter, 0, item, 1, type ) |
| 1935 | 1936 | return model |
| … |
… |
|
| 1962 | 1963 | type = _("network") |
| 1963 | 1964 | else: |
| 1964 | | print "Warning: problem identifying group type!" |
| | 1965 | log.debug(_("Warning: problem identifying group type!")) |
| 1965 | 1966 | pix = art.get_pixbuf_from_name("stock_people") |
| 1966 | 1967 | |
| … |
… |
|
| 2495 | 2496 | |
| 2496 | 2497 | except csv.Error, e: |
| 2497 | | print e.args |
| | 2498 | log.debug(str(e)) |
| 2498 | 2499 | self.showDialog('file %s, line %d: %s' % (filename, reader.line_num, e),gtk.MESSAGE_ERROR) |
| 2499 | 2500 | except IndexError,e: |
| … |
… |
|
| 2642 | 2643 | type = _("network") |
| 2643 | 2644 | else: |
| 2644 | | print "Warning: problem identifying group type!" |
| | 2645 | log.debug(_("Warning: problem identifying group type!")) |
| 2645 | 2646 | model.set (iter, 0, item, 1, type ) |
| 2646 | 2647 | return model |
| … |
… |
|
| 2671 | 2672 | type = _("network") |
| 2672 | 2673 | else: |
| 2673 | | print "Warning: problem identifying group type!" |
| | 2674 | log.debug(_("Warning: problem identifying group type!")) |
| 2674 | 2675 | pix = art.get_pixbuf_from_name("stock_people") |
| 2675 | 2676 | |
| … |
… |
|
| 2784 | 2785 | type = _("network") |
| 2785 | 2786 | else: |
| 2786 | | print "Warning: problem identifying group type!" |
| | 2787 | log.debug(_("Warning: problem identifying group type!")) |
| 2787 | 2788 | model.set (iter, 0, item, 1, type ) |
| 2788 | 2789 | return model |
| … |
… |
|
| 2813 | 2814 | type = _("network") |
| 2814 | 2815 | else: |
| 2815 | | print "Warning: problem identifying group type!" |
| | 2816 | log.debug(_("Warning: problem identifying group type!")) |
| 2816 | 2817 | pix = art.get_pixbuf_from_name("stock_people") |
| 2817 | 2818 | |
-
|
r8458a8c
|
r0adc119
|
|
| 1 | 1 | #!/usr/bin/env python |
| 2 | 2 | import os |
| | 3 | from octofuss import log |
| 3 | 4 | |
| 4 | 5 | class SSHTunnel: |
| … |
… |
|
| 11 | 12 | def run(self): |
| 12 | 13 | '''activate the tunnel''' |
| 13 | | print "starting..." |
| | 14 | log.debug("starting...") |
| 14 | 15 | p = os.popen("ssh -Nf -R %s:localhost:22 %s@%s && echo $!" % (self.port, self.user,self.host),"r") |
| 15 | | print p.read() |
| | 16 | log.debug(p.read()) |
| 16 | 17 | p.close() |
| 17 | 18 | |
| 18 | 19 | def stop(self): |
| 19 | 20 | '''close the tunnel''' |
| 20 | | print "stopping.." |
| | 21 | log.debug("stopping..") |
| 21 | 22 | |
| 22 | 23 | def check(self): |
| 23 | | print "checking.." |
| | 24 | log.debug("checking..") |
| 24 | 25 | |
| 25 | 26 | |
-
|
redfd3b3
|
r0adc119
|
|
| 3 | 3 | export OCTOFUSS_CONF_FILE=`pwd`/octofuss.conf.local |
| 4 | 4 | export PYTHONPATH=`pwd`/lib/ |
| | 5 | #export OCTOFUSS_DEBUG=True |