diff --git a/repo.lisp b/repo.lisp
index c1efd97..5f7de70 100644
--- a/repo.lisp
+++ b/repo.lisp
@@ -194,7 +194,9 @@
(defmethod print-object ((obj repo) stream)
(print-unreadable-object (obj stream :type t :identity t)
(with-slots (dir name uri local-dir packages) obj
- (format stream "~A/~A ~S ~S ~S" dir name uri local-dir packages))))
+ (format stream "~A/~A ~S ~S ~S" dir name uri local-dir
+ (when (slot-boundp obj 'packages)
+ packages)))))
(defmethod initialize-instance :after ((repo repo) &rest initargs)
(declare (ignore initargs))