summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2015-08-29 21:33:42 +0200
committeremkael <emkael@tlen.pl>2015-08-29 21:33:42 +0200
commit1976f33fec7862c5b2a956e83a2029c034e2571d (patch)
tree33b6d8a7b53c892f253b583b1dbb0ffe544866c8
parent0c7c90a56a3feea9910456a23ac94f2c93247d22 (diff)
* proper warning emitting
-rw-r--r--virtual_table.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/virtual_table.py b/virtual_table.py
index d947336..dd0139a 100644
--- a/virtual_table.py
+++ b/virtual_table.py
@@ -3,6 +3,7 @@ import glob
import re
import math
import copy
+import warnings
from os import path
from bs4 import BeautifulSoup as bs4
@@ -75,7 +76,7 @@ class JFRVirtualTable:
if len(names) == 0:
virtual_pairs.append(pair_number)
if len(virtual_pairs) == 0:
- print 'Warning: no virtual pairs detected'
+ warnings.warn('No virtual pairs detected')
return sorted(virtual_pairs)
# wrapper for DOM manipulation
@@ -285,7 +286,7 @@ class JFRVirtualTable:
if path.isfile(self.__collected_scores_file):
self.__fix_collected(self.__collected_scores_file)
else:
- print 'Warning: collected scores not found'
+ warnings.warn('Collected scores file not found')
def fix_records_list(self):
self.__fix_records_list(self.__pair_records_list_file)