- if not os.path.isfile(data_path + '/db'):
- open(data_path + '/db', 'w').write('')
- db = ArticleDB(data_path + '/db')
+ db_filename = os.path.join(data_path, 'db')
+ if not os.path.isfile(db_filename):
+ open(db_filename, 'w').write('')
+ db = ArticleDB(db_filename)