| Home | Trees | Indices | Help |
|---|
|
|
1 ## 2 # Copyright (c) 2007-2016 Apple Inc. All rights reserved. 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 ## 16 17 from caldavclientlibrary.browser.command import Command 18 from caldavclientlibrary.browser.command import WrongOptions 19 import getopt 20 import shlex 2123 275829 opts, args = getopt.getopt(shlex.split(options), '') 30 if len(opts) or len(args) > 1: 31 print self.usage(name) 32 raise WrongOptions() 33 if args and args[0] not in ("on", "off",): 34 print self.usage(name) 35 raise WrongOptions() 36 37 if args: 38 state = args[0] 39 else: 40 state = ("off" if self.shell.account.session.loghttp else "on") 41 if state == "on": 42 self.shell.account.session.loghttp = True 43 print "HTTP logging turned on" 44 else: 45 self.shell.account.session.loghttp = False 46 print "HTTP logging turned off" 47 return True4850 return """Usage: %s [on|off] 51 on - turn HTTP protocol logging on 52 off - turn HTTP protocol logging off 53 without either argument - toggle the state of logging 54 """ % (name,)55
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Thu Jul 7 15:01:48 2011 | http://epydoc.sourceforge.net |