]> www.vanbest.org Git - tv_grab_nl_java/commitdiff
Do not attempt to read config file when asked for capabilities. #19
authorJan-Pascal van Best <janpascal@vanbest.org>
Wed, 8 Apr 2015 21:07:40 +0000 (23:07 +0200)
committerJan-Pascal van Best <janpascal@vanbest.org>
Wed, 8 Apr 2015 21:07:40 +0000 (23:07 +0200)
src/main/java/org/vanbest/xmltv/Main.java

index e98be9025b31cc481f7ae30cf09e0045a04d9233..6260a16079610625be5d14dbcef8685092837cb8 100644 (file)
@@ -439,6 +439,10 @@ public class Main {
                        action = ACTION_DESCRIPTION;
                        return action; // do not read config file
                }
+               if (line.hasOption("capabilities")) {
+                       action = ACTION_CAPABILITIES;
+                       return action; // do not try to read config file
+               }
                if (line.hasOption("config-file")) {
                        configFile = new File(line.getOptionValue("config-file"));
                }
@@ -472,9 +476,6 @@ public class Main {
                if (line.hasOption("offset")) {
                        this.offset = Integer.parseInt(line.getOptionValue("offset"));
                }
-               if (line.hasOption("capabilities")) {
-                       action = ACTION_CAPABILITIES;
-               }
                if (line.hasOption("configure")) {
                        action = ACTION_CONFIGURE;
                }