Unverified Commit 08feb4c3 authored by Isaac Poulton's avatar Isaac Poulton Committed by GitHub
Browse files

Sort straight out of the glob

parent fd627278
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -219,12 +219,12 @@ class Hypernetwork:

def list_hypernetworks(path):
    res = {}
    for filename in glob.iglob(os.path.join(path, '**/*.pt'), recursive=True):
    for filename in sorted(glob.iglob(os.path.join(path, '**/*.pt'), recursive=True)):
        name = os.path.splitext(os.path.basename(filename))[0]
        # Prevent a hypothetical "None.pt" from being listed.
        if name != "None":
            res[name] = filename
    return dict(sorted(res.items()))
    return res


def load_hypernetwork(filename):