|
|
@ -258,15 +258,18 @@ def main(user, password, server, label, inout_file, path, lib_user, lib_password
|
|
|
|
with open(inout_file, "w") as fp:
|
|
|
|
with open(inout_file, "w") as fp:
|
|
|
|
fp.write("")
|
|
|
|
fp.write("")
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
# try:
|
|
|
|
socket.setdefaulttimeout(55)
|
|
|
|
# print('attempting imap grab')
|
|
|
|
urls |= geturls.get_urls_from_imap(server, user, password, label)
|
|
|
|
# socket.setdefaulttimeout(55)
|
|
|
|
socket.setdefaulttimeout(None)
|
|
|
|
# urls |= geturls.get_urls_from_imap(server, user, password, label)
|
|
|
|
except BaseException:
|
|
|
|
# socket.setdefaulttimeout(None)
|
|
|
|
with open(inout_file, "w") as fp:
|
|
|
|
# except BaseException:
|
|
|
|
for cur in urls:
|
|
|
|
# print('imap grab failed')
|
|
|
|
fp.write("{}\n".format(cur))
|
|
|
|
# with open(inout_file, "w") as fp:
|
|
|
|
return
|
|
|
|
# for cur in urls:
|
|
|
|
|
|
|
|
# fp.write("{}\n".format(cur))
|
|
|
|
|
|
|
|
# print(urls)
|
|
|
|
|
|
|
|
# return
|
|
|
|
|
|
|
|
|
|
|
|
if not urls:
|
|
|
|
if not urls:
|
|
|
|
return
|
|
|
|
return
|
|
|
|