working with test case data
This commit is contained in:
14
qlogging.py
14
qlogging.py
@@ -47,12 +47,15 @@ def getunixtimestamp(self):
|
||||
self.uts = self.t.time()
|
||||
self.tl.info(self.uts)
|
||||
|
||||
def writetor(self, filepath='./torrentinfo.txt'):
|
||||
def writetor(self, filepath='./torrentinfo.json'):
|
||||
"""Write all torrent data to a file.
|
||||
Useful for development of new features.
|
||||
"""
|
||||
with open(filepath, 'w') as fp:
|
||||
fp.write(str(self.torrentlist))
|
||||
json_init = self.l(self.torrentlist)
|
||||
print(json_init)
|
||||
# json_object = self.d(self.torrentlist, indent=4)
|
||||
# with open(filepath, 'w') as fp:
|
||||
# fp.write(json_object)
|
||||
|
||||
def listfirsttor(self, index=0):
|
||||
"""Only lists the first torrent"""
|
||||
@@ -86,4 +89,7 @@ def getscriptruntime(self):
|
||||
if self.use_log:
|
||||
self.tl.info(f'Execution time: [{elapsed_time}]')
|
||||
if self.use_pushover:
|
||||
self.extm = f"Execution time: [{elapsed_time}]"
|
||||
self.extm = f"Execution time: [{elapsed_time}]"
|
||||
|
||||
def getobjecttype(object):
|
||||
print(type(object))
|
||||
Reference in New Issue
Block a user