Skip to content

Commit

Permalink
#4 fix debug code, add script name
Browse files Browse the repository at this point in the history
  • Loading branch information
Dacihi Fukui committed Jul 13, 2019
1 parent d03cffc commit 3f1c2b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
try:
text = open('data/text',encoding='utf-8',mode='r').read()
except FileNotFoundError:
print ("INFO: data/text not found. Create empty data/keyword...")
print ("extractor: INFO: data/text not found. Create empty data/keyword...")
file = open('data/text',encoding='utf-8',mode='w')
file.write('')
file.close()
Expand All @@ -29,7 +29,7 @@
continue

if len(text) == 0 or text == '\n' or text == ' ':
print ("INFO: data/text empty. Create empty keyword file...")
print ("extractor: INFO: data/text empty. Create empty keyword file...")
file = open('data/keyword','w')
file.write('')
file.close()
Expand Down Expand Up @@ -65,12 +65,12 @@
if word in text_f:
output_word += word + ' '

print (output_word)
print ("extractor: "+output_word)
file = open('data/keyword','w')
file.write(output_word)
file.close()
end = time.time()
try:
time.sleep(15-(end-start))
except ValueError:
print("Oops: extractor.py took 15+ seconds. Skip sleep.")
print("extractor: Oops: extractor.py took 15+ seconds. Skip sleep.")

0 comments on commit 3f1c2b4

Please sign in to comment.