Trees | Indices | Help |
|
---|
|
1 # This file is part of Buildbot. Buildbot is free software: you can 2 # redistribute it and/or modify it under the terms of the GNU General Public 3 # License as published by the Free Software Foundation, version 2. 4 # 5 # This program is distributed in the hope that it will be useful, but WITHOUT 6 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 # details. 9 # 10 # You should have received a copy of the GNU General Public License along with 11 # this program; if not, write to the Free Software Foundation, Inc., 51 12 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 # 14 # Copyright Buildbot Team Members 15 16 import types 17 import time20 if '@' not in url: 21 return url 22 if '://' not in url: 23 return url 24 25 # urlparse would've been nice, but doesn't support ssh... sigh 26 protocol_url = url.split('://') 27 protocol = protocol_url[0] 28 repo_url = protocol_url[1].split('@')[-1] 29 30 return protocol + '://' + repo_url3134 if _reactor and hasattr(_reactor, "seconds"): 35 return _reactor.seconds() 36 else: 37 return time.time()3840 """An obfuscated string in a command""" 44 47 508652 return other.__class__ is self.__class__ and \ 53 other.real == self.real and \ 54 other.fake == self.fake55 56 @staticmethod 62 63 @staticmethod65 rv = command 66 if type(command) == types.ListType: 67 rv = [] 68 for elt in command: 69 if isinstance(elt, Obfuscated): 70 rv.append(elt.real) 71 else: 72 rv.append(Obfuscated.to_text(elt)) 73 return rv74 75 @staticmethod77 rv = command 78 if type(command) == types.ListType: 79 rv = [] 80 for elt in command: 81 if isinstance(elt, Obfuscated): 82 rv.append(elt.fake) 83 else: 84 rv.append(Obfuscated.to_text(elt)) 85 return rv
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Mar 25 19:40:44 2012 | http://epydoc.sourceforge.net |