~dylanmccall/harvest/gsoc-client-stuff

« back to all changes in this revision

Viewing changes to scripts/util.py

  • Committer: Daniel Holbach
  • Date: 2008-05-08 16:01:00 UTC
  • Revision ID: daniel.holbach@canonical.com-20080508160100-vkyi7t749015sb63
initial cut at really-fix-it++

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import os
 
2
 
 
3
def main_dir():
 
4
    return os.path.join(os.path.dirname(__file__), "..")
 
5
 
 
6
def lazy_makedir(path1, path2):
 
7
    p = os.path.join(path1, path2)
 
8
    if not os.path.exists(p):
 
9
        os.makedirs(p)
 
10
    return p