# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# with this program. If not, see <http://www.gnu.org/licenses/>.
###
import ConfigParser
def create(self, api_url):
# create the directory
- try:
- os.mkdir(self.location, 0755)
- except OSError, e:
+ if os.path.isdir(self.location):
print '%s: you are already in a mw repo' % self.me
sys.exit(1)
+ else:
+ os.mkdir(self.location, 0755)
# create config
self.config = ConfigParser.RawConfigParser()
self.config.add_section('remote')