Skip to content
Snippets Groups Projects
Commit 04de5599 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix backward compatibility of onelab.path

parent b3ce786a
No related branches found
No related tags found
No related merge requests found
......@@ -30,17 +30,11 @@ Please report all bugs and problems to the public mailing list
import socket, struct, os, sys, subprocess, time
_VERSION = '1.1'
def file_exist(filename):
try:
with open(filename) as f:
return True
except IOError:
return False
def path(dirname, inp):
# dirname is a directory, can be empty
# inp is an optional file or subdirectory name
# returns the path to 'inp' in the same directory as 'ref'
dirname = os.path.dirname(dirname)
if not inp:
return dirname
if inp[0] == '/' or inp[0] == '\\' or (len(inp) > 2 and inp[1] == '\:'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment