Skip to content

Commit

Permalink
Check for existance, so mock etc. is happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
james-antill committed May 21, 2014
1 parent 5071829 commit 6e64b14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion yummain.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ def rpmdb_warn_checks():
if base.conf.usr_w_check:
usrinstpath = base.conf.installroot + "/usr"
usrinstpath = usrinstpath.replace('//', '/')
if not os.access(usrinstpath, os.W_OK):
if (os.path.exists(usrinstpath) and
not os.access(usrinstpath, os.W_OK)):
logger.critical(_('No write access to %s directory') % usrinstpath)
logger.critical(_(' Maybe this is an ostree image?'))
logger.critical(_(' To disable you can use --setopt=usr_w_check=false'))
Expand Down

0 comments on commit 6e64b14

Please sign in to comment.