def write_default_files(dpath, name, desc, url):

    if os.path.exists(dpath):
        onlyfiles = [ f for f in os.listdir(dpath) 
                      if os.path.isfile(os.path.join(dpath,f)) ]
        if len(onlyfiles) > 0:
            return #only add defaults if repo is empty
        print "Empty repo - adding default files..."
        files = get_default_files(name, desc)
        if desc.lower() in "python":
            files = files + get_default_py_files(name,desc,url)
            if make_src_dir:
                srcdir = dpath+'/src'
                os.mkdir(srcdir)
                writefile(srcdir+'/__init__.py', '')
                testdir = dpath+'/tests'
                os.mkdir(testdir)
                writefile(testdir+'/__init__.py', '')
                writefile(testdir+'/test_main.py', testfile(name))
        for fname, data in files:
            fn = '/'.join([dpath, fname])
            writefile(fn, data)
dataset/ETHPy150Open thearn/github-auto-tools/github_clonetools/clonetools.py/write_default_files/swapped operands of `in`