Commit 11a2ac83 authored by lixiaofang's avatar lixiaofang

a

parent 1dab6cba
...@@ -41,9 +41,6 @@ def get_data(numtime, numtime2): ...@@ -41,9 +41,6 @@ def get_data(numtime, numtime2):
def write_id_file(id): def write_id_file(id):
try: try:
data1 = open("save_topic_id.txt", "w")
data1.truncate()
data = open("save_topic_id.txt", "a") data = open("save_topic_id.txt", "a")
data.write(str(id)) data.write(str(id))
data.write("\n") data.write("\n")
......
...@@ -57,6 +57,9 @@ def write_id_file(id): ...@@ -57,6 +57,9 @@ def write_id_file(id):
if __name__ == "__main__": if __name__ == "__main__":
try: try:
data1 = open("save_topic_id.txt", "w")
data1.truncate()
numtime1, numtime2 = time_conv(20, 10) numtime1, numtime2 = time_conv(20, 10)
user_id = get_data(numtime1, numtime2) user_id = get_data(numtime1, numtime2)
dicts = {} dicts = {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment