Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running 'fmf init' with '.fmf' file present leads to 'OSError: [Errno 17] File exists' #37

Closed
jkrysl opened this issue Jun 12, 2018 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jkrysl
Copy link
Contributor

jkrysl commented Jun 12, 2018

$ fmf init
Traceback (most recent call last):
File "/usr/bin/fmf", line 4, in
import('pkg_resources').run_script('fmf==0.5.1', 'fmf')
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 658, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 1445, in run_script
exec(script_code, namespace, namespace)
File "/usr/lib/python2.7/site-packages/fmf-0.5.1-py2.7.egg/EGG-INFO/scripts/fmf", line 35, in

File "build/bdist.linux-x86_64/egg/fmf/cli.py", line 194, in main
File "build/bdist.linux-x86_64/egg/fmf/cli.py", line 73, in init
File "build/bdist.linux-x86_64/egg/fmf/cli.py", line 145, in command_init
File "/usr/lib64/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 17] File exists: '/home/jkrysl/tests/python-stqe/tests/.fmf'

@psss
Copy link
Collaborator

psss commented Jun 12, 2018

For existing directory a reasonable error message is displayed:

> mkdir .fmf
> fmf init
[ ERROR ] Directory '/tmp/dir/.fmf' already exists.

This seems to be caused by a file of the same name. But we should handle this as well.

@psss psss added the bug Something isn't working label Jun 12, 2018
@psss psss self-assigned this Jun 12, 2018
@jkrysl jkrysl changed the title Running 'fmf init' with '.fmf' directori present leads to 'OSError: [Errno 17] File exists' Running 'fmf init' with '.fmf' file present leads to 'OSError: [Errno 17] File exists' Jun 12, 2018
@psss psss closed this as completed in 364cf81 Sep 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants