File tree 2 files changed +10
-11
lines changed
2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 1
1
FROM python:3.8-alpine
2
2
3
- WORKDIR /src
4
-
5
- COPY *.md modbus_proxy.py setup.py *.conf ./
3
+ COPY . /src
6
4
7
5
# install dependencies to the local user directory
8
6
RUN pip --disable-pip-version-check --no-input --no-cache-dir --timeout 3 \
9
- install . [yaml]
7
+ install src/ [yaml]
10
8
11
9
# clean up
12
- RUN rm *.md modbus_proxy.py setup.py
10
+ RUN rm /src -r
13
11
14
12
ENTRYPOINT ["modbus-proxy" ]
15
- CMD ["--help" ]
13
+ CMD ["--help" ]
Original file line number Diff line number Diff line change 23
23
"standard" : {"format" : "%(asctime)s %(levelname)8s %(name)s: %(message)s" }
24
24
},
25
25
"handlers" : {
26
- "console" : {
27
- "class" : "logging.StreamHandler" ,
28
- "formatter" : "standard" ,
29
- }
26
+ "console" : {"class" : "logging.StreamHandler" , "formatter" : "standard" }
30
27
},
31
28
"root" : {"handlers" : ["console" ], "level" : "INFO" },
32
29
}
@@ -286,7 +283,11 @@ def parse_args(args=None):
286
283
type = str ,
287
284
help = "log configuration file. By default log to stderr with log level = INFO" ,
288
285
)
289
- return parser .parse_args (args = args )
286
+ options = parser .parse_args (args = args )
287
+
288
+ if not options .config_file and not options .modbus :
289
+ parser .exit (1 , "must give a config-file or/and a --modbus" )
290
+ return options
290
291
291
292
292
293
def create_config (args ):
You can’t perform that action at this time.
0 commit comments