ikt/ium — Issue #9: UnboundLocalError: local variable 'mod_rtime' referenced before assignment
Author: ikt
Created: 2012-01-24 16:15:52+00:00
State: open

ikt@ikt-desktop:~$ lium
Downloading your usage, this may take a few seconds...

----------------------------------------------------
Linux Internode Usage Meter - 0.4.4
You have used 6.99 GB (3%) out of 200.00 GB.

You have 194.00 GB (97%) remaining.

You have used 0 MB today.

Traceback (most recent call last):
File "/usr/local/bin/lium", line 559, in
main()
File "/usr/local/bin/lium", line 556, in main
lium_folder_check()
File "/usr/local/bin/lium", line 29, in lium_folder_check
doesuserexist()
File "/usr/local/bin/lium", line 37, in doesuserexist
get_time("usage")
File "/usr/local/bin/lium", line 58, in get_time
check_update_time(localday, localhour, localmin, filetimeday, filetimehour, filetimemin, file)
File "/usr/local/bin/lium", line 83, in check_update_time
readfile()
File "/usr/local/bin/lium", line 170, in readfile
openurl(username, password)
File "/usr/local/bin/lium", line 240, in openurl
save_data_to_file(new_data, "initial")
File "/usr/local/bin/lium", line 263, in save_data_to_file
get_info("usage")
File "/usr/local/bin/lium", line 191, in get_info
download_data(req, status)
File "/usr/local/bin/lium", line 216, in download_data
save_data_to_file(userage, status)
File "/usr/local/bin/lium", line 267, in save_data_to_file
get_info("history")
File "/usr/local/bin/lium", line 197, in get_info
download_data(req, status)
File "/usr/local/bin/lium", line 216, in download_data
save_data_to_file(userage, status)
File "/usr/local/bin/lium", line 271, in save_data_to_file
get_info("service")
File "/usr/local/bin/lium", line 203, in get_info
download_data(req, status)
File "/usr/local/bin/lium", line 216, in download_data
save_data_to_file(userage, status)
File "/usr/local/bin/lium", line 275, in save_data_to_file
parse_xml_file()
File "/usr/local/bin/lium", line 529, in parse_xml_file
print("There are", format(days_remaining_decimal()[0],'.1f'),"days", "("+format(days_remaining_decimal()[1],'.1f')+"%) left in your usage month.")
File "/usr/local/bin/lium", line 453, in days_remaining_decimal
day_dec = turn_that_frown_upside_down("days_used") / 100.0
File "/usr/local/bin/lium", line 437, in turn_that_frown_upside_down
days_used = convert_dates_to_integer("total_days") - convert_dates_to_integer("days_remain")
File "/usr/local/bin/lium", line 414, in convert_dates_to_integer
return int(days_in_rollover_month_total().days)
File "/usr/local/bin/lium", line 406, in days_in_rollover_month_total
datetime.datetime(mod_rtime, previous_month_dec, rtime()[3])
UnboundLocalError: local variable 'mod_rtime' referenced before assignment