git.ucc.asn.au
/
frenchie
/
icalparse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d26bdde
)
Tabs vs Spaces
master
1.1
author
James French
<
[email protected]
>
Thu, 16 Jul 2020 05:00:58 +0000
(13:00 +0800)
committer
James French
<
[email protected]
>
Thu, 16 Jul 2020 05:00:58 +0000
(13:00 +0800)
icalparse.py
patch
|
blob
|
history
diff --git
a/icalparse.py
b/icalparse.py
index
c5d469e
..
59e409b
100755
(executable)
--- a/
icalparse.py
+++ b/
icalparse.py
@@
-68,7
+68,7
@@
def getHTTPContent(url=''):
try:
import httplib2
except ImportError:
try:
import httplib2
except ImportError:
- pass
+
pass
if not url: return ('','')
if not url: return ('','')
@@
-124,6
+124,7
@@
def generateRules(ruleConfig):
parserrules.ruleConfig[conf] = ruleConfig[conf]
rules = [getattr(parserrules, rule) for rule in dir(parserrules) if callable(getattr(parserrules, rule))]
parserrules.ruleConfig[conf] = ruleConfig[conf]
rules = [getattr(parserrules, rule) for rule in dir(parserrules) if callable(getattr(parserrules, rule))]
+
return rules
return rules
@@
-215,13
+216,13
@@
def runCGI():
form = cgi.FieldStorage()
if "uid" not in form or "key" not in form:
form = cgi.FieldStorage()
if "uid" not in form or "key" not in form:
- print('Content-Type: text/calendar\n')
- sys.exit(0)
+
print('Content-Type: text/calendar\n')
+
sys.exit(0)
try:
try:
- # UID should be numeric, if it's not we have someone playing games
- uid = int(form['uid'].value)
+
# UID should be numeric, if it's not we have someone playing games
+
uid = int(form['uid'].value)
except:
except:
- exitQuiet()
+
exitQuiet()
# The user's key will be a 16 character string
key = form['key'].value
# The user's key will be a 16 character string
key = form['key'].value
@@
-234,11
+235,11
@@
def runCGI():
# nothing just assume they want Australia/Perth
tz = ""
if "tz" in form:
# nothing just assume they want Australia/Perth
tz = ""
if "tz" in form:
- from pytz import timezone
- try:
- timezone(form['tz'].value)
- tz = form['tz'].value
- except: pass
+
from pytz import timezone
+
try:
+
timezone(form['tz'].value)
+
tz = form['tz'].value
+
except: pass
ruleConfig["defaultTZ"] = tz or ruleConfig["defaultTZ"]
ruleConfig["defaultTZ"] = tz or ruleConfig["defaultTZ"]
UCC
git Repository :: git.ucc.asn.au