rgerganov / py-air-control

Command line app for controlling Philips air purifiers
MIT License
256 stars 52 forks source link

logging.conf created in home directory #55

Open nunq opened 3 years ago

nunq commented 3 years ago

for some time now, the file ~/logging.conf keeps getting created by py-air-control.

here is the output of auditctl after running airctrl:

type=PROCTITLE msg=audit(2020-07-22 23:05:58.900:6666) : proctitle=/usr/bin/python /usr/bin/airctrl --ipaddr IPADDRESS --mode P 
type=PATH msg=audit(2020-07-22 23:05:58.900:6666) : item=0 name=logging.conf inode=10545314 dev=00:2c mode=file,644 ouid=USERNAME ogid=USERNAME rdev=00:00 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 
type=CWD msg=audit(2020-07-22 23:05:58.900:6666) : cwd=/home/USERNAME 
type=SYSCALL msg=audit(2020-07-22 23:05:58.900:6666) : arch=x86_64 syscall=openat success=yes exit=3 a0=0xffffff9c a1=0x7fba86660bc0 a2=O_RDONLY|O_CLOEXEC a3=0x0 items=1 ppid=991359 pid=993825 auid=USERNAME uid=USERNAME gid=USERNAME euid=USERNAME suid=USERNAME fsuid=USERNAME egid=USERNAME sgid=USERNAME fsgid=USERNAME tty=pts0 ses=1 comm=airctrl exe=/usr/bin/python3.8 key=(null) 

since the file is named logging.conf, i assume that is about - well - configuring how logging should be done, however, can't this be put in XDG_CONFIG_HOME i.e. $HOME/.config/airctrl/logging.conf ?

[ and while we're at it, we could also move ~/.pyairctrl there :) ]

and if this would lead to too much breakage, is there an option one can set that prevents this file from being created?

thanks.

rgerganov commented 3 years ago

Creating logging.conf is some nonsense from the CoAPthon library. I filed a bug there.

jackjansen commented 3 years ago

@rgerganov do you mind if I also use your fork of CoAPthon? Would be silly to fork it twice (and if ever you decide to drop maintenance of your fork I presume the original is going to be fixed, and otherwise I'll fork myself).

rgerganov commented 3 years ago

I don't mind at all. At some point I may also create a new CoAP package from this fork and put it on PyPI. Also if you have any pending fixes, PRs are welcome