Created
December 1, 2013 03:06
-
-
Save tsuyukimakoto/7728056 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11c11 | |
< | |
--- | |
> | |
16c16 | |
< if opts.has_key('data'): | |
--- | |
> if 'data' in opts: | |
19c19 | |
< if not os.environ.has_key('EDITOR'): | |
--- | |
> if not 'EDITOR' in os.environ: | |
21c21 | |
< | |
--- | |
> | |
24c24 | |
< c = yaml.dump(opts['config'] if opts.has_key('config') else Pit.get(name) ,default_flow_style=False) | |
--- | |
> c = yaml.dump(opts['config'] if 'config' in opts else Pit.get(name) ,default_flow_style=False) | |
34c34 | |
< print 'No Changes' | |
--- | |
> print('No Changes') | |
50,51c50,51 | |
< ret = load_data[name] if load_data.has_key(name) else {} | |
< if opts.has_key('require'): | |
--- | |
> ret = load_data[name] if name in load_data else {} | |
> if 'require' in opts: | |
55c55 | |
< ret[key] = opts['require'][key] | |
--- | |
> ret[key] = opts['require'][key] | |
57c57 | |
< | |
--- | |
> | |
75c75 | |
< os.chmod(Pit.DIRECTORY, 0700) | |
--- | |
> os.chmod(Pit.DIRECTORY, 0o700) | |
81c81 | |
< os.chmod(Pit._config, 0600) | |
--- | |
> os.chmod(Pit._config, 0o600) | |
86,87c86,87 | |
< yaml.dump({}, | |
< open(Pit._profile, 'w'), | |
--- | |
> yaml.dump({}, | |
> open(Pit._profile, 'w'), | |
89c89 | |
< os.chmod(Pit._profile, 0600) | |
--- | |
> os.chmod(Pit._profile, 0o600) | |
98,100c98,100 | |
< print config | |
< print config['email'] | |
< print config['password'] | |
email: mtsuyuki@gmail.com | |
--- | |
> print(config) | |
> print(config['email']) | |
> print(config['password']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment