Variable referenced before assignment in "realistic_email"
havanagrawal opened this issue · comments
https://github.com/tirthajyoti/pydbgen/blob/master/pydbgen/pydbgen.py#L99
import pydbgen
myDB = pydbgen.pydb()
myDB.realistic_email("Peter Parker")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "...../pydbgen/pydbgen/pydbgen.py", line 99, in realistic_email
print(path)
UnboundLocalError: local variable 'path' referenced before assignment
Additionally, the dir path uses an OS specific separator, which causes it to fail on Mac.
path = dir_path + "\Domains.txt"
Do you think it's cool to use os.path.abspath to? I'm fixing it