Commit Graph

11 Commits

Author SHA1 Message Date
Nils Philippsen
74752c3a3c Cope with dangling symlinks
The exists() method uses os.stat() instead of os.lstat() and so doesn't
work for symlinks pointing to a non-existent path. A corresponding
lexists() method doesn't exist yet.

Signed-off-by: Nils Philippsen <nils@redhat.com>
2020-06-25 10:30:33 +02:00
Nils Philippsen
34d165ab0d Fix hook links to Pagure hookrunner script, too
This doesn't attempt to prefix the base directory if a supplied `target`
is an absolute path (for debugging).

Fixes: fedora-infrastructure#9000

Signed-off-by: Nils Philippsen <nils@redhat.com>
2020-06-25 07:26:50 +00:00
Nils Philippsen
5175246b89 Fix wrong argument help string
Signed-off-by: Nils Philippsen <nils@redhat.com>
2020-06-25 07:26:50 +00:00
Nils Philippsen
a87c762569 Convert to pathlib API for easy path manipulation
The only left over is os.readlink() which was only introduced as
Path.readlink() in Python 3.9.

Signed-off-by: Nils Philippsen <nils@redhat.com>
2020-06-25 07:26:50 +00:00
Pierre-Yves Chibon
e864768c74 Typi typoes...
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2018-04-17 15:49:44 +02:00
Pierre-Yves Chibon
7b6407df81 Technically we only need os.walk() on forks
The other namespace won't have sub-folders

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2018-04-17 15:46:41 +02:00
Pierre-Yves Chibon
cab27352d2 Some more fixes to the script
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2018-04-17 15:26:02 +02:00
Pierre-Yves Chibon
c825ebf5a0 Another attempt at not going down the rabbit hole
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2018-04-17 15:22:17 +02:00
Pierre-Yves Chibon
8a180b87c0 Fix checking only a specific namespace
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2018-04-17 15:14:28 +02:00
Pierre-Yves Chibon
1320c7f424 Remove a debugging statement
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2018-04-17 14:06:21 +02:00
Pierre-Yves Chibon
0b2079ca11 Add new script to check the post-receive hooks on dist-git
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2018-04-17 12:52:32 +02:00