Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
chinoogawa
GitHub Repository: chinoogawa/fbht
Path: blob/master/handlers.py
206 views
1
class signalCaught(Exception):
2
def __init__(self, *args):
3
# *args is used to get a list of the parameters passed in
4
self.args = [a for a in args]
5
6
class customCookies():
7
def __init__(self):
8
self
9
10
def isLogged(self,cj):
11
for cookie in cj:
12
if (cookie.name == 'c_user') or (cookie.name == 'checkpoint'):
13
return True
14
return False
15
16
def checkPoint(self,cj):
17
for cookie in cj:
18
if (cookie.name == 'checkpoint'):
19
print '\r Checkpoint - Error \r',
20
return True
21
return False
22
23
24
def signal_handler(signal, frame):
25
print "\n Aborted by user.\n"
26
raise signalCaught('Control C')
27