Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


Quelle  test_executable.py   Sprache: Python

 

#!/usr/bin/env python
"""
Test that only executable files have an executable bit set
"
""
from __future__ import print_function

import os

from get_sympy import path_hack
base_dir = path_hack()

def test_executable(path):
    if not os.path.isdir(path):
        if os.access(path, os.X_OK):
            with open(path, 'rb') as f:
                if f.read(2) != b'#!':
                    exn_msg = "File at " + path + " either should not be executable or should have a shebang line"
                    raise OSError(exn_msg)
    else:
        for file in os.listdir(path):
            if file in ('.git', 'venv_main'):
                continue
            test_executable(os.path.join(path, file))

test_executable(base_dir)

Messung
CHZG
86957685

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,293
#Domains=919,312