commit/galaxy-central: inithello: Fix error when attempting to remove a file.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/d1b1558308dc/ Changeset: d1b1558308dc User: inithello Date: 2013-12-18 19:11:37 Summary: Fix error when attempting to remove a file. Affected #: 1 file diff -r c4c6e8ea9837d4aa4fbbf08a681fd0c72b34f5b6 -r d1b1558308dc1cbb8076d20a7b7d130ca4051e1d lib/tool_shed/scripts/clean_up_tool_dependency_directory.py --- a/lib/tool_shed/scripts/clean_up_tool_dependency_directory.py +++ b/lib/tool_shed/scripts/clean_up_tool_dependency_directory.py @@ -9,9 +9,12 @@ os.mkdir( args.tool_dependency_dir ) return 0 else: - for subdirectory in os.listdir( args.tool_dependency_dir ): - print 'Deleting directory %s from %s.' % ( subdirectory, args.tool_dependency_dir ) - shutil.rmtree( os.path.join( args.tool_dependency_dir, subdirectory ) ) + for content in os.listdir( args.tool_dependency_dir ): + print 'Deleting directory %s from %s.' % ( content, args.tool_dependency_dir ) + if os.path.isdir( content ): + shutil.rmtree( os.path.join( args.tool_dependency_dir, content ) ) + else: + os.remove( content ) if __name__ == '__main__': description = 'Clean out the configured tool dependency path, creating it if it does not exist.' Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org