bharadwaj-raju / WeatherDesk

MOVED: https://gitlab.com/bharadwaj-raju/WeatherDesk
https://gitlab.com/bharadwaj-raju/WeatherDesk
GNU General Public License v3.0
217 stars 31 forks source link

Simplify the function check_if_all_files_exist #3

Closed ghost closed 8 years ago

ghost commented 8 years ago

Just simplify this function. I think it would be better like that if you want to add newly required files ;)

bharadwaj-raju commented 8 years ago

Appears good, but if time is False, then there is no day and night, too. Just weather. Referring to lines 248-249.

ghost commented 8 years ago

I'm in total agreement. I remove the last else in my factorization (when time is false) and move the declaration of required_files over the if time:

If time is False then the variable required_files is not modified because the last else you seen in my code refers to the second if the one with if args.time == 3: .

Normally the code is well indented. I checked it this morning with passing the argument --time and I think it works. Or maybe I didn't understand well your answer. Let me know!

bharadwaj-raju commented 8 years ago

Looking great! Have you tested it with all options?

bharadwaj-raju commented 8 years ago

Great! It works!

Accepting.