wernerfred / check_synology

This plugin will check a lot of different values on your Synology DiskStation.
MIT License
17 stars 25 forks source link

Fix disk state evaluation and add the shebang line #31

Closed Doomas closed 2 years ago

Doomas commented 2 years ago

Hi

Disk state fix: adding the disk states with += results in an Array of single letters. Therefore the final disk state was in every case "UNKOWN". With states.append() it works as intended.

Shebang: The script was not automatically execute on my servers without the shebang

Regards Thomas

wernerfred commented 2 years ago

Change was introduced in #28 by @amotl - can you have a look too please?

Doomas commented 2 years ago

Ok, I've checked it, and I think this a bug.

To append a entire String to an array you should use states.append()(I think this is the faster operation) or states += ["STATE"] (with square brackets).

But I like to know if this works for @amotl

Kraeutergarten commented 2 years ago

I can confirm this BUG. Please use append and add a python3 shebang.

wernerfred commented 2 years ago

@all-contributors add @Doomas for code

allcontributors[bot] commented 2 years ago

@wernerfred

I've put up a pull request to add @Doomas! :tada:

wernerfred commented 2 years ago

@all-contributors please add @Kraeutergarten for User Testing

allcontributors[bot] commented 2 years ago

@wernerfred

I've put up a pull request to add @Kraeutergarten! :tada:

amotl commented 2 years ago

Hi there,

it definitively looks like that I made a mistake here. Apologies. Thank you very much for discovering and fixing this, @Doomas!

@wernerfred: I think it is ready to be merged. Go ahead!

With kind regards, Andreas.